LinuxCommandLibrary

az-aks

Manage Azure Kubernetes Service (AKS) clusters

TLDR

List AKS clusters

$ az aks list [[-g|--resource-group]] [resource_group]
copy

Create a new AKS cluster
$ az aks create [[-g|--resource-group]] [resource_group] [[-n|--name]] [name] [[-c|--node-count]] [count] --node-vm-size [size]
copy

Delete an AKS cluster
$ az aks delete [[-g|--resource-group]] [resource_group] [[-n|--name]] [name]
copy

Get the access credentials for an AKS cluster
$ az aks get-credentials [[-g|--resource-group]] [resource_group] [[-n|--name]] [name]
copy

Get the upgrade versions available for an AKS cluster
$ az aks get-upgrades [[-g|--resource-group]] [resource_group] [[-n|--name]] [name]
copy

SYNOPSIS

az aks [--debug] [--help -h] [--only-show-errors] [--output -o] [--query] [--subscription] [--verbose] <command>

PARAMETERS

--debug
    Increase logging verbosity to show all debug logs.

--help -h
    Show this help message and exit.

--only-show-errors
    Only show errors, suppressing warnings.

--output -o
    Output format. [default: json] [known values: json, jsonc, table, tsv]

--query
    JMESPath query string. See http://jmespath.org/ for more.

--subscription
    Name or ID of subscription. Configurable via az account set -s NAME_OR_ID.

--verbose
    Increase logging verbosity. Use --debug for full debug logs.

DESCRIPTION

The az aks command is part of the Azure Command-Line Interface (CLI), a cross-platform tool for managing Azure resources. It provides a comprehensive set of subcommands to create, configure, scale, upgrade, and delete managed Kubernetes clusters in Azure Kubernetes Service (AKS).

AKS simplifies deploying, scaling, and managing containerized applications using Kubernetes without needing to handle the underlying infrastructure. With az aks, users can quickly provision clusters, generate kubeconfig files for kubectl access, list available upgrades, rotate certificates, and troubleshoot issues. It's essential for DevOps workflows, CI/CD pipelines, and hybrid cloud setups.

Key features include support for multiple node pools, virtual node integration, and monitoring. Requires an active Azure subscription and authentication via az login. Ideal for developers and administrators automating Kubernetes operations on Azure.

CAVEATS

Requires Azure CLI installation and az login. Not all features available in every region. High-privilege operations may need RBAC roles.

COMMON SUBCOMMANDS

create: Create a cluster.
get-credentials: Download kubeconfig.
list: List clusters.
show: Display cluster details.
upgrade: Upgrade Kubernetes version.
delete: Delete a cluster.

PREREQUISITES

Install via curl -sL https://aka.ms/InstallAzureCLIDeb | bash. Authenticate with az login.

HISTORY

Introduced with Azure CLI v2.0 in 2017 alongside AKS public preview. Evolved with Kubernetes versions up to 1.30+, adding features like confidential computing and GitOps.

SEE ALSO

kubectl(1), docker(1), az(1)

Copied to clipboard