Log in as a service principal
Non-interactive login for CI; with OIDC, use --federated-token instead of a secret.
az login --service-principal -u <id> -p "$AZ_SECRET" --tenant <id>
- tool
- az4 commands
More az commands
-
az aks get-credentials -g <name> -n <cluster> --overwrite-existingMerge the AKS context into kubeconfig; adding --admin skips Azure AD RBAC if it is enabled.
-
az keyvault secret show --vault-name <name> --name <name> --query value -o tsvGet 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.