I'm using aks-flex-node in an Azure VM with MI enabled. Following the steps in the usage guide for service principal and also looking at the e2e test pipeline flow its not clear why:
- We need to install az cli in the VM when using MI and do an az login
- Need to perform an RBAC assignment (owner role per usage guide for service principal)
- uninstall.sh script removes az cli so if one had installed it for other reasons this ends up removing it.
When using MI based auth for kubelet expectation would be that only the role binding creation is required for the AAD enabled cluster.
So would be nice if an option to skip az cli install/login/rbac assignment is enabled for MI mode.