Get AKS credentials for kubeconfig

Merge the AKS context into kubeconfig; adding --admin skips Azure AD RBAC if it is enabled.

az aks get-credentials -g <name> -n <cluster> --overwrite-existing

tool
az4 commands
tags
azk8scloud

More az commands

  • az keyvault secret show --vault-name <name> --name <name> --query value -o tsv

    Get the raw secret without quotes using --query and -o tsv, ready to put into an env variable.

  • az vm list -d -o table --query "[].{name:name,ip:publicIps,state:powerState}"

    -d adds live details like the public IP and power state; without it, these fields are missing.

  • az login --service-principal -u <id> -p "$AZ_SECRET" --tenant <id>

    Non-interactive login for CI; with OIDC, use --federated-token instead of a secret.

all 4 az commands