az aks

Manage Azure Kubernetes Services.

Commands

az aks browse Show the dashboard for a Kubernetes cluster in a web browser.
az aks create Create a new managed Kubernetes cluster.
az aks delete Delete a managed Kubernetes cluster.
az aks disable-addons Disable Kubernetes addons.
az aks enable-addons Enable Kubernetes addons.
az aks get-credentials Get access credentials for a managed Kubernetes cluster.
az aks get-upgrades Get the upgrade versions available for a managed Kubernetes cluster.
az aks get-versions Get the versions available for creating a managed Kubernetes cluster.
az aks install-cli Download and install kubectl, the Kubernetes command-line tool.
az aks install-connector Install the ACI Connector on a managed Kubernetes cluster.
az aks list List managed Kubernetes clusters.
az aks nodepool Commands to manage node pools in Kubernetes kubernetes cluster.
az aks nodepool add Add a node pool to the managed Kubernetes cluster.
az aks nodepool delete Delete the agent pool in the managed Kubernetes cluster.
az aks nodepool list List node pools in the managed Kubernetes cluster.
az aks nodepool scale Scale the node pool in a managed Kubernetes cluster.
az aks nodepool show Show the details for a node pool in the managed Kubernetes cluster.
az aks nodepool update Update a node pool to enable/disable cluster-autoscaler or change min-count or max-count.
az aks nodepool upgrade Upgrade the node pool in a managed Kubernetes cluster.
az aks remove-connector Remove the ACI Connector from a managed Kubernetes cluster.
az aks remove-dev-spaces Remove Azure Dev Spaces from a managed Kubernetes cluster.
az aks scale Scale the node pool in a managed Kubernetes cluster.
az aks show Show the details for a managed Kubernetes cluster.
az aks update Update a managed Kubernetes cluster.
az aks update-credentials Update credentials for a managed Kubernetes cluster, like service principal.
az aks upgrade Upgrade a managed Kubernetes cluster to a newer version.
az aks upgrade-connector Upgrade the ACI Connector on a managed Kubernetes cluster.
az aks use-dev-spaces Use Azure Dev Spaces with a managed Kubernetes cluster.
az aks wait Wait for a managed Kubernetes cluster to reach a desired state.

az aks browse

Show the dashboard for a Kubernetes cluster in a web browser.

az aks browse --name
--resource-group
[--disable-browser]
[--listen-address]
[--listen-port]
[--subscription]

Examples

Show the dashboard for a Kubernetes cluster in a web browser. (autogenerated)

az aks browse --name MyManagedCluster --resource-group MyResourceGroup

Required Parameters

--name -n

Name of the managed cluster.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--disable-browser

Don't launch a web browser after establishing port-forwarding.

--listen-address

The listening address for the dashboard.

default value: 127.0.0.1
--listen-port

The listening port for the dashboard.

default value: 8001
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az aks create

Create a new managed Kubernetes cluster.

az aks create --name
--resource-group
[--aad-client-app-id]
[--aad-server-app-id]
[--aad-server-app-secret]
[--aad-tenant-id]
[--admin-username]
[--api-server-authorized-ip-ranges]
[--attach-acr]
[--client-secret]
[--disable-rbac]
[--dns-name-prefix]
[--dns-service-ip]
[--docker-bridge-address]
[--enable-addons]
[--enable-cluster-autoscaler]
[--enable-rbac]
[--generate-ssh-keys]
[--kubernetes-version]
[--load-balancer-managed-outbound-ip-count]
[--load-balancer-outbound-ip-prefixes]
[--load-balancer-outbound-ips]
[--load-balancer-sku]
[--location]
[--max-count]
[--max-pods]
[--min-count]
[--network-plugin]
[--network-policy]
[--no-ssh-key]
[--no-wait]
[--node-count]
[--node-osdisk-size]
[--node-vm-size]
[--nodepool-name]
[--pod-cidr]
[--service-cidr]
[--service-principal]
[--skip-subnet-role-assignment]
[--ssh-key-value]
[--subscription]
[--tags]
[--vm-set-type]
[--vnet-subnet-id]
[--workspace-resource-id]
[--zones {1, 2, 3}]

Examples

Create a Kubernetes cluster with an existing SSH public key.

az aks create -g MyResourceGroup -n MyManagedCluster --ssh-key-value /path/to/publickey

Create a Kubernetes cluster with a specific version.

az aks create -g MyResourceGroup -n MyManagedCluster --kubernetes-version 1.12.6

Create a Kubernetes cluster with a larger node pool.

az aks create -g MyResourceGroup -n MyManagedCluster --node-count 7

Create a kubernetes cluster with k8s 1.13.9 but use vmas.

az aks create -g MyResourceGroup -n MyManagedCluster --kubernetes-version 1.13.9 --vm-set-type AvailabilitySet

Create a kubernetes cluster with default kubernetes vesrion, default SKU load balancer(basic) and default vm set type(AvailabilitySet).

az aks create -g MyResourceGroup -n MyManagedCluster

Create a kubernetes cluster with standard SKU load balancer and two AKS created IPs for the load balancer outbound connection usage.

az aks create -g MyResourceGroup -n MyManagedCluster --load-balancer-managed-outbound-ip-count 2

Create a kubernetes cluster with standard SKU load balancer and use the provided public IPs for the load balancer outbound connection usage.

az aks create -g MyResourceGroup -n MyManagedCluster --load-balancer-outbound-ips <ip-resource-id-1,ip-resource-id-2>

Create a kubernetes cluster with standard SKU load balancer and use the provided public IP prefixes for the load balancer outbound connection usage.

az aks create -g MyResourceGroup -n MyManagedCluster --load-balancer-outbound-ip-prefixes <ip-prefix-resource-id-1,ip-prefix-resource-id-2>

Create a kubernetes cluster with basic SKU load balancer and AvailabilitySet vm set type.

az aks create -g MyResourceGroup -n MyManagedCluster --load-balancer-sku basic --vm-set-type AvailabilitySet

Create a kubernetes cluster with authorized apiserver IP ranges.

az aks create -g MyResourceGroup -n MyManagedCluster --api-server-authorized-ip-ranges 193.168.1.0/24,194.168.1.0/24,195.168.1.0

Required Parameters

--name -n

Name of the managed cluster.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--aad-client-app-id

The ID of an Azure Active Directory client application of type "Native". This application is for user login via kubectl.

--aad-server-app-id

The ID of an Azure Active Directory server application of type "Web app/API". This application represents the managed cluster's apiserver (Server application).

--aad-server-app-secret

The secret of an Azure Active Directory server application.

--aad-tenant-id

The ID of an Azure Active Directory tenant.

--admin-username -u

User account to create on node VMs for SSH access.

default value: azureuser
--api-server-authorized-ip-ranges

Comma seperated list of authorized apiserver IP ranges. Set to 0.0.0.0/32 to restrict apiserver traffic to node pools.

--attach-acr

Grant the 'acrpull' role assignment to the ACR specified by name or resource ID.

--client-secret

Secret associated with the service principal. This argument is required if --service-principal is specified.

--disable-rbac

Disable Kubernetes Role-Based Access Control.

--dns-name-prefix -p

Prefix for hostnames that are created. If not specified, generate a hostname using the managed cluster and resource group names.

--dns-service-ip

An IP address assigned to the Kubernetes DNS service.

--docker-bridge-address

A specific IP address and netmask for the Docker bridge, using standard CIDR notation.

--enable-addons -a

Enable the Kubernetes addons in a comma-separated list.

--enable-cluster-autoscaler

Enable cluster autoscaler, default value is false.

--enable-rbac -r

Enable Kubernetes Role-Based Access Control. Default: enabled.

--generate-ssh-keys

Generate SSH public and private key files if missing. The keys will be stored in the ~/.ssh directory.

--kubernetes-version -k

Version of Kubernetes to use for creating the cluster, such as "1.11.8" or "1.12.6".

value from: `az aks get-versions`
--load-balancer-managed-outbound-ip-count

Load balancer managed outbound IP count.

--load-balancer-outbound-ip-prefixes

Load balancer outbound IP prefix resource IDs.

--load-balancer-outbound-ips

Load balancer outbound IP resource IDs.

--load-balancer-sku

Azure Load Balancer SKU selection for your cluster. basic or standard.

--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--max-count

Maximum nodes count used for autoscaler, when "--enable-cluster-autoscaler" specified. Please specify the value in the range of [1, 100].

--max-pods -m

The maximum number of pods deployable to a node.

--min-count

Minimum nodes count used for autoscaler, when "--enable-cluster-autoscaler" specified. Please specify the value in the range of [1, 100].

--network-plugin

The Kubernetes network plugin to use.

--network-policy

The Kubernetes network policy to use.

--no-ssh-key -x

Do not use or create a local SSH key.

--no-wait

Do not wait for the long-running operation to finish.

--node-count -c

Number of nodes in the Kubernetes node pool. After creating a cluster, you can change the size of its node pool with az aks scale.

default value: 3
--node-osdisk-size

Size in GB of the OS disk for each node in the node pool. Minimum 30 GB.

--node-vm-size -s

Size of Virtual Machines to create as Kubernetes nodes.

default value: Standard_DS2_v2
--nodepool-name

Node pool name, upto 12 alphanumeric characters.

default value: nodepool1
--pod-cidr

A CIDR notation IP range from which to assign pod IPs when kubenet is used.

--service-cidr

A CIDR notation IP range from which to assign service cluster IPs.

--service-principal

Service principal used for authentication to Azure APIs.

--skip-subnet-role-assignment

Skip role assignment for subnet (advanced networking).

--ssh-key-value

Public key path or key contents to install on node VMs for SSH access. For example, 'ssh-rsa AAAAB...snip...UcyupgH azureuser@linuxvm'.

default value: ~\.ssh\id_rsa.pub
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--tags

Space-separated tags in 'key[=value]' format. Use "" to clear existing tags.

--vm-set-type

Agent pool vm set type. VirtualMachineScaleSets or AvailabilitySet.

--vnet-subnet-id

The ID of a subnet in an existing VNet into which to deploy the cluster.

--workspace-resource-id

The resource ID of an existing Log Analytics Workspace to use for storing monitoring data. If not specified, uses the default Log Analytics Workspace if it exists, otherwise creates one.

--zones -z

Availability zones where agent nodes will be placed.

accepted values: 1, 2, 3

az aks delete

Delete a managed Kubernetes cluster.

az aks delete --name
--resource-group
[--no-wait]
[--subscription]
[--yes]

Examples

Delete a managed Kubernetes cluster. (autogenerated)

az aks delete --name MyManagedCluster --resource-group MyResourceGroup

Required Parameters

--name -n

Name of the managed cluster.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--no-wait

Do not wait for the long-running operation to finish.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--yes -y

Do not prompt for confirmation.

az aks disable-addons

Disable Kubernetes addons.

az aks disable-addons --addons
--name
--resource-group
[--no-wait]
[--subscription]

Examples

Disable Kubernetes addons. (autogenerated)

az aks disable-addons --addons virtual-node --name MyManagedCluster --resource-group MyResourceGroup

Required Parameters

--addons -a

Disable the Kubernetes addons in a comma-separated list.

--name -n

Name of the managed cluster.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--no-wait

Do not wait for the long-running operation to finish.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az aks enable-addons

Enable Kubernetes addons.

az aks enable-addons --addons
--name
--resource-group
[--no-wait]
[--subnet-name]
[--subscription]
[--workspace-resource-id]

Examples

Enable Kubernetes addons. (autogenerated)

az aks enable-addons --addons virtual-node --name MyManagedCluster --resource-group MyResourceGroup

Required Parameters

--addons -a

Enable the Kubernetes addons in a comma-separated list.

--name -n

Name of the managed cluster.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--no-wait

Do not wait for the long-running operation to finish.

--subnet-name -s

Name of an existing subnet to use with the virtual-node add-on.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--workspace-resource-id

The resource ID of an existing Log Analytics Workspace to use for storing monitoring data.

az aks get-credentials

Get access credentials for a managed Kubernetes cluster.

az aks get-credentials --name
--resource-group
[--admin]
[--context]
[--file]
[--overwrite-existing]
[--subscription]

Examples

Get access credentials for a managed Kubernetes cluster. (autogenerated)

az aks get-credentials --name MyManagedCluster --resource-group MyResourceGroup

Required Parameters

--name -n

Name of the managed cluster.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--admin -a

Get cluster administrator credentials. Default: cluster user credentials.

--context

If specified, overwrite the default context name.

--file -f

Kubernetes configuration file to update. Use "-" to print YAML to stdout instead.

default value: ~/.kube/config
--overwrite-existing

Overwrite any existing cluster entry with the same name.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az aks get-upgrades

Get the upgrade versions available for a managed Kubernetes cluster.

az aks get-upgrades --name
--resource-group
[--subscription]

Examples

Get the upgrade versions available for a managed Kubernetes cluster

az aks get-upgrades --name MyManagedCluster --resource-group MyResourceGroup

Required Parameters

--name -n

Name of the managed cluster.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az aks get-versions

Get the versions available for creating a managed Kubernetes cluster.

az aks get-versions --location
[--subscription]

Examples

Get the versions available for creating a managed Kubernetes cluster

az aks get-versions --location westus2

Required Parameters

--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

Optional Parameters

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az aks install-cli

Download and install kubectl, the Kubernetes command-line tool.

az aks install-cli [--client-version]
[--install-location]
[--subscription]

Optional Parameters

--client-version

Version of the client to install.

default value: latest
--install-location

Path at which to install DC/OS.

default value: ~/.azure-kubectl/kubectl.exe
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az aks install-connector

Install the ACI Connector on a managed Kubernetes cluster.

az aks install-connector --name
--resource-group
[--aci-resource-group]
[--chart-url]
[--client-secret]
[--connector-name]
[--image-tag]
[--location]
[--os-type {Both, Linux, Windows}]
[--service-principal]
[--subscription]

Examples

Install the virtual Kubelet for Linux to a managed Kubernetes cluster.

az aks install-connector --name MyManagedCluster --resource-group MyResourceGroup

Install the virtual Kubelet for Windows to a managed Kubernetes cluster.

az aks install-connector --name MyManagedCluster --resource-group MyResourceGroup \
   --connector-name virtual-kubelet --os-type Windows

Install the virtual Kubelet for both Windows and Linux to a managed Kubernetes cluster.

az aks install-connector --name MyManagedCluster --resource-group MyResourceGroup \
  --connector-name virtual-kubelet --os-type Both

Install the virtual Kubelet using a specific service principal in a specific resource group.

az aks install-connector --name MyManagedCluster --resource-group MyResourceGroup \
  --connector-name virtual-kubelet --service-principal {SPN_ID} --client-secret {SPN_SECRET} \
  --aci-resource-group ACI-resource-group

Install the virtual Kubelet from a custom Helm chart with custom tag.

az aks install-connector --name MyManagedCluster --resource-group MyResourceGroup \
  --connector-name virtual-kubelet --chart-url {CustomURL} --image-tag {VirtualKubeletImageTag}

Required Parameters

--name -n

Name of the managed cluster.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--aci-resource-group

The resource group to create the ACI container groups. Use the MC_* resource group if it is not specified.

--chart-url

URL of a Helm chart that installs ACI Connector.

default value: <a href="https://github.com/virtual-kubelet/virtual-kubelet/raw/master/charts/virtual-kubelet-for-aks-latest.tgz">https://github.com/virtual-kubelet/virtual-kubelet/raw/master/charts/virtual-kubelet-for-aks-latest.tgz</a>
--client-secret

Secret associated with the service principal. This argument is required if --service-principal is specified.

--connector-name

Name of the ACI Connector.

default value: aci-connector
--image-tag

The image tag of the virtual kubelet. Use 'latest' if it is not specified.

--location -l

The location to create the ACI container groups. Use the location of the MC_* resource group if it is not specified.

--os-type

Install support for deploying ACIs of this operating system type.

accepted values: Both, Linux, Windows
default value: Linux
--service-principal

Service principal used for authentication to Azure APIs.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az aks list

List managed Kubernetes clusters.

az aks list [--resource-group]
[--subscription]

Optional Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az aks remove-connector

Remove the ACI Connector from a managed Kubernetes cluster.

az aks remove-connector --name
--resource-group
[--connector-name]
[--graceful]
[--location]
[--os-type {Both, Linux, Windows}]
[--subscription]

Examples

Remove the ACI Connector from a cluster using the graceful mode.

az aks remove-connector --name MyManagedCluster --resource-group MyResourceGroup \
  --connector-name MyConnector --graceful

Remove the ACI Connector from a managed Kubernetes cluster. (autogenerated)

az aks remove-connector --connector-name MyConnector --name MyManagedCluster --os-type Windows --resource-group MyResourceGroup

Required Parameters

--name -n

Name of the managed cluster.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--connector-name

Name of the ACI Connector.

default value: aci-connector
--graceful

Use a "cordon and drain" strategy to evict pods safely before removing the ACI node.

--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--os-type

Remove support for deploying ACIs of this operating system type.

accepted values: Both, Linux, Windows
default value: Linux
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az aks remove-dev-spaces

Remove Azure Dev Spaces from a managed Kubernetes cluster.

az aks remove-dev-spaces --name
--resource-group
[--subscription]
[--yes]

Examples

Remove Azure Dev Spaces from a managed Kubernetes cluster.

az aks remove-dev-spaces -g my-aks-group -n my-aks

Remove Azure Dev Spaces from a managed Kubernetes cluster without prompting.

az aks remove-dev-spaces -g my-aks-group -n my-aks --yes

Required Parameters

--name -n

Name of the managed cluster.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--yes -y

Do not prompt for confirmation.

az aks scale

Scale the node pool in a managed Kubernetes cluster.

az aks scale --name
--node-count
--resource-group
[--no-wait]
[--nodepool-name]
[--subscription]

Examples

Scale the node pool in a managed Kubernetes cluster. (autogenerated)

az aks scale --name MyManagedCluster --node-count 3 --resource-group MyResourceGroup

Required Parameters

--name -n

Name of the managed cluster.

--node-count -c

Number of nodes in the Kubernetes node pool.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--no-wait

Do not wait for the long-running operation to finish.

--nodepool-name

Node pool name, upto 12 alphanumeric characters.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az aks show

Show the details for a managed Kubernetes cluster.

az aks show --name
--resource-group
[--subscription]

Examples

Show the details for a managed Kubernetes cluster

az aks show --name MyManagedCluster --resource-group MyResourceGroup

Required Parameters

--name -n

Name of the managed cluster.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az aks update

Update a managed Kubernetes cluster.

az aks update --name
--resource-group
[--api-server-authorized-ip-ranges]
[--attach-acr]
[--detach-acr]
[--disable-cluster-autoscaler]
[--enable-cluster-autoscaler]
[--load-balancer-managed-outbound-ip-count]
[--load-balancer-outbound-ip-prefixes]
[--load-balancer-outbound-ips]
[--max-count]
[--min-count]
[--no-wait]
[--subscription]
[--update-cluster-autoscaler]

Examples

Update a kubernetes cluster with standard SKU load balancer to use two AKS created IPs for the load balancer outbound connection usage.

az aks update -g MyResourceGroup -n MyManagedCluster --load-balancer-managed-outbound-ip-count 2

Update a kubernetes cluster with standard SKU load balancer to use the provided public IPs for the load balancer outbound connection usage.

az aks update -g MyResourceGroup -n MyManagedCluster --load-balancer-outbound-ips <ip-resource-id-1,ip-resource-id-2>

Update a kubernetes cluster with standard SKU load balancer to use the provided public IP prefixes for the load balancer outbound connection usage.

az aks update -g MyResourceGroup -n MyManagedCluster --load-balancer-outbound-ip-prefixes <ip-prefix-resource-id-1,ip-prefix-resource-id-2>

Attach AKS cluster to ACR by name "acrName"

az aks update -g MyResourceGroup -n MyManagedCluster --attach-acr acrName

Update a kubernetes cluster with authorized apiserver ip ranges.

az aks update -g MyResourceGroup -n MyManagedCluster --api-server-authorized-ip-ranges 193.168.1.0/24,194.168.1.0/24

Disable authorized apiserver ip ranges feature for a kubernetes cluster.

az aks update -g MyResourceGroup -n MyManagedCluster --api-server-authorized-ip-ranges ""

Restrict apiserver traffic in a kubernetes cluster to agentpool nodes.

az aks update -g MyResourceGroup -n MyManagedCluster --api-server-authorized-ip-ranges 0.0.0.0/32

Required Parameters

--name -n

Name of the managed cluster.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--api-server-authorized-ip-ranges

Comma seperated list of authorized apiserver IP ranges. Set to "" to allow all traffic on a previously restricted cluster. Set to 0.0.0.0/32 to restrict apiserver traffic to node pools.

--attach-acr

Grant the 'acrpull' role assignment to the ACR specified by name or resource ID.

--detach-acr

Disable the 'acrpull' role assignment to the ACR specified by name or resource ID.

--disable-cluster-autoscaler -d

Disable cluster autoscaler.

--enable-cluster-autoscaler -e

Enable cluster autoscaler.

--load-balancer-managed-outbound-ip-count

Load balancer managed outbound IP count.

--load-balancer-outbound-ip-prefixes

Load balancer outbound IP prefix resource IDs.

--load-balancer-outbound-ips

Load balancer outbound IP resource IDs.

--max-count

Maximum nodes count used for autoscaler, when "--enable-cluster-autoscaler" specified. Please specify the value in the range of [1, 100].

--min-count

Minimum nodes count used for autoscaler, when "--enable-cluster-autoscaler" specified. Please specify the value in the range of [1, 100].

--no-wait

Do not wait for the long-running operation to finish.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--update-cluster-autoscaler -u

Update min-count or max-count for cluster autoscaler.

az aks update-credentials

Update credentials for a managed Kubernetes cluster, like service principal.

az aks update-credentials --name
--resource-group
[--aad-client-app-id]
[--aad-server-app-id]
[--aad-server-app-secret]
[--aad-tenant-id]
[--client-secret]
[--no-wait]
[--reset-aad]
[--reset-service-principal]
[--service-principal]
[--subscription]

Examples

Update an existing Kubernetes cluster with new service principal.

az aks update-credentials -g MyResourceGroup -n MyManagedCluster --reset-service-principal --service-principal MyNewServicePrincipalID --client-secret MyNewServicePrincipalSecret

Update an existing Azure Active Directory Kubernetes cluster with new server app secret key.

az aks update-credentials -g MyResourceGroup -n MyManagedCluster --reset-aad --aad-server-app-id MyExistingAADServerAppID --aad-server-app-secret MyNewAADServerAppSecret --aad-client-app-id MyExistingAADClientAppID --aad-tenant-id MyAADTenantID

Required Parameters

--name -n

Name of the managed cluster.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--aad-client-app-id

The ID of an Azure Active Directory client application. This argument is required if --reset-aad is specified.

--aad-server-app-id

The ID of an Azure Active Directory server application. This argument is required if --reset-aad is specified.

--aad-server-app-secret

The secret of an Azure Active Directory server application. This argument is required if --reset-aad is specified.

--aad-tenant-id

Tenant ID associated with Azure Active Directory.

--client-secret

Secret associated with the service principal. This argument is required if --service-principal is specified.

--no-wait

Do not wait for the long-running operation to finish.

--reset-aad

Reset Azure Active Directory configuration for a managed cluster.

--reset-service-principal

Reset service principal for a managed cluster.

--service-principal

Service principal used for authentication to Azure APIs. This argument is required if --reset-service-principal is specified.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az aks upgrade

Upgrade a managed Kubernetes cluster to a newer version.

az aks upgrade --kubernetes-version
--name
--resource-group
[--control-plane-only]
[--no-wait]
[--subscription]
[--yes]

Examples

Upgrade a managed Kubernetes cluster to a newer version. (autogenerated)

az aks upgrade --kubernetes-version 1.12.6 --name MyManagedCluster --resource-group MyResourceGroup

Required Parameters

--kubernetes-version -k

Version of Kubernetes to upgrade the cluster to, such as "1.11.8" or "1.12.6".

value from: `az aks get-upgrades`
--name -n

Name of the managed cluster.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--control-plane-only

Upgrade the cluster control plane only. If not specified, both control plane AND all node pools will be upgraded.

--no-wait

Do not wait for the long-running operation to finish.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--yes -y

Do not prompt for confirmation.

az aks upgrade-connector

Upgrade the ACI Connector on a managed Kubernetes cluster.

az aks upgrade-connector --name
--resource-group
[--aci-resource-group]
[--chart-url]
[--client-secret]
[--connector-name]
[--image-tag]
[--location]
[--os-type {Both, Linux, Windows}]
[--service-principal]
[--subscription]

Examples

Upgrade the ACI Connector for Linux to a managed Kubernetes cluster.

az aks upgrade-connector --name MyManagedCluster --resource-group MyResourceGroup \
  --connector-name virtual-kubelet

Upgrade the ACI Connector for Windows to a managed Kubernetes cluster.

az aks upgrade-connector --name MyManagedCluster --resource-group MyResourceGroup \
   --connector-name virtual-kubelet --os-type Windows

Upgrade the ACI Connector for both Windows and Linux to a managed Kubernetes cluster.

az aks upgrade-connector --name MyManagedCluster --resource-group MyResourceGroup \
  --connector-name virtual-kubelet --os-type Both

Upgrade the ACI Connector to use a specific service principal in a specific resource group.

az aks upgrade-connector --name MyManagedCluster --resource-group MyResourceGroup \
  --connector-name virtual-kubelet --service-principal {SPN_ID} --client-secret {SPN_SECRET} \
  --aci-resource-group ACI-resource-group

Upgrade the ACI Connector from a custom Helm chart with custom tag.

az aks upgrade-connector --name MyManagedCluster --resource-group MyResourceGroup \
  --connector-name virtual-kubelet --chart-url {CustomURL} --image-tag {VirtualKubeletImageTag}

Required Parameters

--name -n

Name of the managed cluster.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--aci-resource-group

The resource group to create the ACI container groups. Use the MC_* resource group if it is not specified.

--chart-url

URL of a Helm chart that installs ACI Connector.

default value: <a href="https://github.com/virtual-kubelet/virtual-kubelet/raw/master/charts/virtual-kubelet-for-aks-latest.tgz">https://github.com/virtual-kubelet/virtual-kubelet/raw/master/charts/virtual-kubelet-for-aks-latest.tgz</a>
--client-secret

Secret associated with the service principal. This argument is required if --service-principal is specified.

--connector-name

Name of the ACI Connector.

default value: aci-connector
--image-tag

The image tag of the virtual kubelet. Use 'latest' if it is not specified.

--location -l

The location to create the ACI container groups. Use the location of the MC_* resource group if it is not specified.

--os-type

Install support for deploying ACIs of this operating system type.

accepted values: Both, Linux, Windows
default value: Linux
--service-principal

Service principal used for authentication to Azure APIs.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az aks use-dev-spaces

Use Azure Dev Spaces with a managed Kubernetes cluster.

az aks use-dev-spaces --name
--resource-group
[--space]
[--subscription]
[--update]
[--yes]

Examples

Use Azure Dev Spaces with a managed Kubernetes cluster, interactively selecting a dev space.

az aks use-dev-spaces -g my-aks-group -n my-aks

Use Azure Dev Spaces with a managed Kubernetes cluster, updating to the latest Azure Dev Spaces client components and selecting a new or existing dev space 'my-space'.

az aks use-dev-spaces -g my-aks-group -n my-aks --update --space my-space

Use Azure Dev Spaces with a managed Kubernetes cluster, selecting a new or existing dev space 'develop/my-space' without prompting for confirmation.

az aks use-dev-spaces -g my-aks-group -n my-aks -s develop/my-space -y

Required Parameters

--name -n

Name of the managed cluster.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--space -s

Name of the new or existing dev space to select. Defaults to an interactive selection experience.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--update

Update to the latest Azure Dev Spaces client components.

--yes -y

Do not prompt for confirmation. Requires --space.

az aks wait

Wait for a managed Kubernetes cluster to reach a desired state.

az aks wait --name
--resource-group
[--created]
[--custom]
[--deleted]
[--exists]
[--interval]
[--subscription]
[--timeout]
[--updated]

Examples

Wait for a cluster to be upgraded, polling every minute for up to thirty minutes.

az aks wait -g MyResourceGroup -n MyManagedCluster --updated --interval 60 --timeout 1800

Wait for a managed Kubernetes cluster to reach a desired state (autogenerated)

az aks wait --created --interval 60 --name MyManagedCluster --resource-group MyResourceGroup --timeout 1800

Required Parameters

--name -n

Name of the managed cluster.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--created

Wait until created with 'provisioningState' at 'Succeeded'.

--custom

Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].

--deleted

Wait until deleted.

--exists

Wait until the resource exists.

--interval

Polling interval in seconds.

default value: 30
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--timeout

Maximum wait in seconds.

default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.