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. Download and install kubelogin, a client-go credential (exec) plugin implementing azure authentication. |
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 get-upgrades |
Get the available upgrade versions for an agent pool of 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-dev-spaces |
Remove Azure Dev Spaces from a managed Kubernetes cluster. |
az aks rotate-certs |
Rotate certificates and keys on 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 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 of the managed cluster.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Don't launch a web browser after establishing port-forwarding.
The listening address for the dashboard.
The listening port for the dashboard.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
az aks create
Create a new managed Kubernetes cluster.
az aks create --name
--resource-group
[--aad-admin-group-object-ids]
[--aad-client-app-id]
[--aad-server-app-id]
[--aad-server-app-secret]
[--aad-tenant-id]
[--admin-username]
[--api-server-authorized-ip-ranges]
[--attach-acr]
[--ca-profile]
[--client-secret]
[--disable-rbac]
[--dns-name-prefix]
[--dns-service-ip]
[--docker-bridge-address]
[--enable-aad]
[--enable-addons]
[--enable-cluster-autoscaler]
[--enable-managed-identity]
[--enable-node-public-ip]
[--enable-private-cluster]
[--enable-rbac]
[--generate-ssh-keys]
[--kubernetes-version]
[--load-balancer-idle-timeout]
[--load-balancer-managed-outbound-ip-count]
[--load-balancer-outbound-ip-prefixes]
[--load-balancer-outbound-ips]
[--load-balancer-outbound-ports]
[--load-balancer-sku]
[--location]
[--max-count]
[--max-pods]
[--min-count]
[--network-plugin {azure, kubenet}]
[--network-policy]
[--no-ssh-key]
[--no-wait]
[--node-count]
[--node-osdisk-diskencryptionset-id]
[--node-osdisk-size]
[--node-vm-size]
[--nodepool-labels]
[--nodepool-name]
[--nodepool-tags]
[--outbound-type {loadBalancer, userDefinedRouting}]
[--pod-cidr]
[--service-cidr]
[--service-principal]
[--skip-subnet-role-assignment]
[--ssh-key-value]
[--subscription]
[--tags]
[--uptime-sla]
[--vm-set-type]
[--vnet-subnet-id]
[--windows-admin-password]
[--windows-admin-username]
[--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.16.9
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.16.9 --vm-set-type AvailabilitySet
Create a kubernetes cluster with default kubernetes version, default SKU load balancer (Standard) and default vm set type (VirtualMachineScaleSets).
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 a standard SKU load balancer, with two outbound AKS managed IPs an idle flow timeout of 5 minutes and 8000 allocated ports per machine
az aks create -g MyResourceGroup -n MyManagedCluster --load-balancer-managed-outbound-ip-count 2 --load-balancer-idle-timeout 5 --load-balancer-outbound-ports 8000
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
Create a kubernetes cluster which enables managed identity.
az aks create -g MyResourceGroup -n MyManagedCluster --enable-managed-identity
Create a kubernetes cluster with userDefinedRouting, standard load balancer SKU and a custom subnet preconfigured with a route table
az aks create -g MyResourceGroup -n MyManagedCluster --outbound-type userDefinedRouting --load-balancer-sku standard --vnet-subnet-id customUserSubnetVnetID
Create a kubernetes cluster with supporting Windows agent pools.
az aks create -g MyResourceGroup -n MyManagedCluster --load-balancer-sku Standard --network-plugin azure --windows-admin-username azure --windows-admin-password 'replacePassword1234$'
Create a kubernetes cluster with managed AAD enabled.
az aks create -g MyResourceGroup -n MyManagedCluster --enable-aad --aad-admin-group-object-ids <id-1,id-2> --aad-tenant-id <id>
Create a kubernetes cluster with server side encryption using your owned key.
az aks create -g MyResourceGroup -n MyManagedCluster --node-osdisk-diskencryptionset-id <disk-encryption-set-resource-id>
Required Parameters
Name of the managed cluster.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Comma seperated list of aad group object IDs that will be set as cluster admin.
The ID of an Azure Active Directory client application of type "Native". This application is for user login via kubectl.
The ID of an Azure Active Directory server application of type "Web app/API". This application represents the managed cluster's apiserver (Server application).
The secret of an Azure Active Directory server application.
The ID of an Azure Active Directory tenant.
User account to create on node VMs for SSH access.
Comma seperated list of authorized apiserver IP ranges. Set to 0.0.0.0/32 to restrict apiserver traffic to node pools.
Grant the 'acrpull' role assignment to the ACR specified by name or resource ID.
Space-separated list of key=value pairs for configuring cluster autoscaler. Pass an empty string to clear the profile.
Secret associated with the service principal. This argument is required if --service-principal
is specified.
Disable Kubernetes Role-Based Access Control.
Prefix for hostnames that are created. If not specified, generate a hostname using the managed cluster and resource group names.
An IP address assigned to the Kubernetes DNS service.
A specific IP address and netmask for the Docker bridge, using standard CIDR notation.
Enable managed AAD feature for cluster.
Enable the Kubernetes addons in a comma-separated list.
Enable cluster autoscaler, default value is false.
Using a system assigned managed identity to manage cluster resource group.
Enable VMSS node public IP.
Enable private cluster.
Enable Kubernetes Role-Based Access Control. Default: enabled.
Generate SSH public and private key files if missing. The keys will be stored in the ~/.ssh directory.
Version of Kubernetes to use for creating the cluster, such as "1.16.9".
Load balancer idle timeout in minutes.
Load balancer managed outbound IP count.
Load balancer outbound IP prefix resource IDs.
Load balancer outbound IP resource IDs.
Load balancer outbound allocated ports.
Azure Load Balancer SKU selection for your cluster. basic or standard.
Location. Values from: az account list-locations
. You can configure the default location using az configure --defaults location=<location>
.
Maximum nodes count used for autoscaler, when "--enable-cluster-autoscaler" specified. Please specify the value in the range of [1, 100].
The maximum number of pods deployable to a node.
Minimum nodes count used for autoscaler, when "--enable-cluster-autoscaler" specified. Please specify the value in the range of [1, 100].
The Kubernetes network plugin to use.
The Kubernetes network policy to use.
Do not use or create a local SSH key.
Do not wait for the long-running operation to finish.
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
.
ResourceId of the disk encryption set to use for enabling encryption at rest on agent node os disk.
Size in GB of the OS disk for each node in the node pool. Minimum 30 GB.
Size of Virtual Machines to create as Kubernetes nodes.
Space-separated labels: key[=value] [key[=value] ...]. You can not change the node labels through CLI after creation. See https://aka.ms/node-labels for syntax of labels.
Node pool name, up to 12 alphanumeric characters.
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
How outbound traffic will be configured for a cluster.
A CIDR notation IP range from which to assign pod IPs when kubenet is used.
A CIDR notation IP range from which to assign service cluster IPs.
Service principal used for authentication to Azure APIs.
Skip role assignment for subnet (advanced networking).
Public key path or key contents to install on node VMs for SSH access. For example, 'ssh-rsa AAAAB...snip...UcyupgH azureuser@linuxvm'.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
Enable a paid managed cluster service with a financially backed SLA.
Agent pool vm set type. VirtualMachineScaleSets or AvailabilitySet.
The ID of a subnet in an existing VNet into which to deploy the cluster.
Password to create on Windows node VMs.
Username to create on Windows node VMs.
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.
Availability zones where agent nodes will be placed.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
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 of the managed cluster.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Do not wait for the long-running operation to finish.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Do not prompt for confirmation.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
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
Disable the Kubernetes addons in a comma-separated list.
Name of the managed cluster.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Do not wait for the long-running operation to finish.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
az aks enable-addons
Enable Kubernetes addons.
These addons are available: http_application_routing - configure ingress with automatic public DNS name creation. monitoring - turn on Log Analytics monitoring. Requires "--workspace-resource-id". If monitoring addon is enabled --no-wait argument will have no effect virtual-node - enable AKS Virtual Node. Requires --subnet-name to provide the name of an existing subnet for the Virtual Node to use. azure-policy - enable Azure policy. The Azure Policy add-on for AKS enables at-scale enforcements and safeguards on your clusters in a centralized, consistent manner. Learn more at aka.ms/aks/policy.
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 --subnet MySubnetName
Required Parameters
Enable the Kubernetes addons in a comma-separated list.
Name of the managed cluster.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Do not wait for the long-running operation to finish.
Name of an existing subnet to use with the virtual-node add-on.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
The resource ID of an existing Log Analytics Workspace to use for storing monitoring data.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
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 of the managed cluster.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Get cluster administrator credentials. Default: cluster user credentials.
If specified, overwrite the default context name.
Kubernetes configuration file to update. Use "-" to print YAML to stdout instead.
Overwrite any existing cluster entry with the same name.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
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 of the managed cluster.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
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. Values from: az account list-locations
. You can configure the default location using az configure --defaults location=<location>
.
Optional Parameters
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
az aks install-cli
Download and install kubectl, the Kubernetes command-line tool. Download and install kubelogin, a client-go credential (exec) plugin implementing azure authentication.
az aks install-cli [--client-version]
[--install-location]
[--kubelogin-install-location]
[--kubelogin-version]
[--subscription]
Optional Parameters
Version of kubectl to install.
Path at which to install kubectl.
Path at which to install kubelogin.
Version of kubelogin to install.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
az aks list
List managed Kubernetes clusters.
az aks list [--query-examples]
[--resource-group]
[--subscription]
Optional Parameters
Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
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 of the managed cluster.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Do not prompt for confirmation.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
az aks rotate-certs
Rotate certificates and keys on a managed Kubernetes cluster.
Kubernetes will be unavailable during cluster certificate rotation.
az aks rotate-certs --name
--resource-group
[--no-wait]
[--subscription]
[--yes]
Required Parameters
Name of the managed cluster.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Do not wait for the long-running operation to finish.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Do not prompt for confirmation.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
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 of the managed cluster.
Number of nodes in the Kubernetes node pool.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Do not wait for the long-running operation to finish.
Node pool name, up to 12 alphanumeric characters.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
az aks show
Show the details for a managed Kubernetes cluster.
az aks show --name
--resource-group
[--query-examples]
[--subscription]
Examples
Show the details for a managed Kubernetes cluster
az aks show --name MyManagedCluster --resource-group MyResourceGroup
Required Parameters
Name of the managed cluster.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
az aks update
Update a managed Kubernetes cluster.
az aks update --name
--resource-group
[--aad-admin-group-object-ids]
[--aad-tenant-id]
[--api-server-authorized-ip-ranges]
[--attach-acr]
[--ca-profile]
[--detach-acr]
[--disable-cluster-autoscaler]
[--enable-aad]
[--enable-cluster-autoscaler]
[--load-balancer-idle-timeout]
[--load-balancer-managed-outbound-ip-count]
[--load-balancer-outbound-ip-prefixes]
[--load-balancer-outbound-ips]
[--load-balancer-outbound-ports]
[--max-count]
[--min-count]
[--no-wait]
[--subscription]
[--update-cluster-autoscaler]
[--uptime-sla]
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>
Create a kubernetes cluster with a standard SKU load balancer, with two outbound AKS managed IPs an idle flow timeout of 5 minutes and 8000 allocated ports per machine
az aks update -g MyResourceGroup -n MyManagedCluster --load-balancer-managed-outbound-ip-count 2 --load-balancer-idle-timeout 5 --load-balancer-outbound-ports 8000
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
Update a AKS-managed AAD cluster with tenant ID or admin group object IDs.
az aks update -g MyResourceGroup -n MyManagedCluster --aad-admin-group-object-ids <id-1,id-2> --aad-tenant-id <id>
Migrate a AKS AAD-Integrated cluster or a non-AAD cluster to a AKS-managed AAD cluster.
az aks update -g MyResourceGroup -n MyManagedCluster --enable-aad --aad-admin-group-object-ids <id-1,id-2> --aad-tenant-id <id>
Required Parameters
Name of the managed cluster.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Comma seperated list of aad group object IDs that will be set as cluster admin.
The ID of an Azure Active Directory tenant.
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.
Grant the 'acrpull' role assignment to the ACR specified by name or resource ID.
Space-separated list of key=value pairs for configuring cluster autoscaler. Pass an empty string to clear the profile.
Disable the 'acrpull' role assignment to the ACR specified by name or resource ID.
Disable cluster autoscaler.
Enable managed AAD feature for cluster.
Enable cluster autoscaler.
Load balancer idle timeout in minutes.
Load balancer managed outbound IP count.
Load balancer outbound IP prefix resource IDs.
Load balancer outbound IP resource IDs.
Load balancer outbound allocated ports.
Maximum nodes count used for autoscaler, when "--enable-cluster-autoscaler" specified. Please specify the value in the range of [1, 100].
Minimum nodes count used for autoscaler, when "--enable-cluster-autoscaler" specified. Please specify the value in the range of [1, 100].
Do not wait for the long-running operation to finish.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Update min-count or max-count for cluster autoscaler.
Enable a paid managed cluster service with a financially backed SLA.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
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 of the managed cluster.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
The ID of an Azure Active Directory client application. This argument is required if --reset-aad
is specified.
The ID of an Azure Active Directory server application. This argument is required if --reset-aad
is specified.
The secret of an Azure Active Directory server application. This argument is required if --reset-aad
is specified.
Tenant ID associated with Azure Active Directory.
Secret associated with the service principal. This argument is required if --service-principal
is specified.
Do not wait for the long-running operation to finish.
Reset Azure Active Directory configuration for a managed cluster.
Reset service principal for a managed cluster.
Service principal used for authentication to Azure APIs. This argument is required if --reset-service-principal
is specified.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
az aks upgrade
Upgrade a managed Kubernetes cluster to a newer version.
Kubernetes will be unavailable during cluster upgrades.
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
Version of Kubernetes to upgrade the cluster to, such as "1.16.9".
Name of the managed cluster.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Upgrade the cluster control plane only. If not specified, both control plane AND all node pools will be upgraded.
Do not wait for the long-running operation to finish.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Do not prompt for confirmation.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
az aks use-dev-spaces
Use Azure Dev Spaces with a managed Kubernetes cluster.
az aks use-dev-spaces --name
--resource-group
[--endpoint {None, Private, Public}]
[--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
Use Azure Dev Spaces with a managed Kubernetes cluster with a private endpoint.
az aks use-dev-spaces -g my-aks-group -n my-aks -e private
Required Parameters
Name of the managed cluster.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
The endpoint type to be used for a Azure Dev Spaces controller. See https://aka.ms/azds-networking for more information.
Name of the new or existing dev space to select. Defaults to an interactive selection experience.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Update to the latest Azure Dev Spaces client components.
Do not prompt for confirmation. Requires --space.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
az aks wait
Wait for a managed Kubernetes cluster to reach a desired state.
If an operation on a cluster was interrupted or was started with --no-wait
, use this command to wait for it to complete.
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 of the managed cluster.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Wait until created with 'provisioningState' at 'Succeeded'.
Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].
Wait until deleted.
Wait until the resource exists.
Polling interval in seconds.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Maximum wait in seconds.
Wait until updated with provisioningState at 'Succeeded'.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.