Skip to main content

Azure CLI

The Azure Command Line Interface enables access to Azure services including AKS (Azure Kubernetes Service) clusters.

Official documentation: learn.microsoft.com/cli/azure

Prerequisites

Installation

# Using winget
winget install Microsoft.AzureCLI
winget install Microsoft.Azure.Kubelogin

# Using Chocolatey
choco install azure-cli
choco install kubelogin
kubelogin Required

kubelogin is required for Azure AD authentication to AKS clusters. See Azure kubelogin documentation for more details.

Verify Installation

az --version
kubelogin --version

SSO Configuration

The p6m CLI automatically configures Azure credentials:

# Configure Azure (updates credentials and ~/.kube/config for AKS)
p6m sso azure

# Or configure all cloud platforms at once
p6m sso

Manual Azure Login

After initial configuration, authenticate when your session expires:

az login

AKS Cluster Access

After authentication, add AKS clusters to your kubeconfig:

az aks get-credentials --resource-group <rg-name> --name <cluster-name>

The p6m CLI can also configure this automatically via p6m sso azure.