When on a AKS cluster the Local Accounts are disabled and we can't use SSH Keys the Bicep Kubernetes Provider can't be used. Would like to use the provider with RBAC enabled and Managed Identity.
What I tried:
Create AKS Cluster without local accounts
resource cluster 'Microsoft.ContainerService/managedClusters@2022-11-01' = {
name: clusterName
properties: {
disableLocalAccounts: true
// linuxProfile: null
}
Use listClusterAdminCredential() to generate kubeConfig.
module clusterRoleBinding './modules/cluster-role-binding.bicep' = {
name: 'clusterRoleBinding'
params: {
kubeConfig: cluster.listClusterAdminCredential().kubeconfigs[0].value
}
}
Use kubeConfig
@secure()
param kubeConfig string
import 'kubernetes@1.0.0' with {
namespace: 'default'
kubeConfig: kubeConfig
} as k8s
When deploying this, the following error occurs:
Getting static credential is not allowed because this cluster is set to disable local accounts.
Would like to see the provider works without local account and SSH Keys.
When on a AKS cluster the Local Accounts are disabled and we can't use SSH Keys the Bicep Kubernetes Provider can't be used. Would like to use the provider with RBAC enabled and Managed Identity.
What I tried:
Create AKS Cluster without local accounts
Use listClusterAdminCredential() to generate kubeConfig.
Use kubeConfig
When deploying this, the following error occurs:
Getting static credential is not allowed because this cluster is set to disable local accounts.Would like to see the provider works without local account and SSH Keys.