Reputation: 475
My friend has created a Aks cluster with resource-group = abc and name =abc.
He added my credentials as cluster-admin.
AKS_CLUSTER=$(az aks show --resource-group abc --name abc --query id -o tsv)
az role assignment create \
--assignee $ACCOUNT_ID \
--scope $AKS_CLUSTER \
--role "Azure Kubernetes Service Cluster Admin Role for <Blah>"
When I login and check I get no output.
az aks list
Do, I need to do something more. Any pointers ?
Upvotes: 1
Views: 1333
Reputation: 2569
Creating a service principal is a quick way to access the cluster, but one must appreciate this is not always fitting with security policy and that the principal is a completely separate from your own personal Azure AD account.
If you want to use your own account then a tenant admin should follow the steps outlined in this article:
https://learn.microsoft.com/en-us/azure/aks/azure-ad-integration
Upvotes: 1
Reputation: 222522
You need to create a service principal
az aks create \
--resource-group myResourceGroup \
--name myAKSCluster \
--service-principal <appId> \
--client-secret <password>
then you need to log in with the subscription and service principal
az login --service-principal --username APP_ID --password PASSWORD --tenant TENANT_ID
Upvotes: 1