你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。

az aks nodepool auto-scale

注释

此命令组具有在Azure CLI和至少一个扩展中定义的命令。 安装每个扩展,使其受益于其扩展功能。 了解更多关于扩展程序的信息。

用于管理 nodepool virtualMachinesProfile.scale.autoscale 的命令。

命令

名称 说明 类型 Status
az aks nodepool auto-scale add

将新的自动缩放配置文件添加到托管 Kubernetes 群集中的 VirtualMachines 代理池。

Core GA
az aks nodepool auto-scale add (aks-preview 扩展)

将新的自动缩放配置文件添加到托管 Kubernetes 群集中的 VirtualMachines 代理池。

扩展 GA
az aks nodepool auto-scale delete

从托管 Kubernetes 群集中的 VirtualMachines 代理池中删除现有的自动缩放配置文件。

Core GA
az aks nodepool auto-scale delete (aks-preview 扩展)

从托管 Kubernetes 群集中的 VirtualMachines 代理池中删除现有的自动缩放配置文件。

扩展 GA
az aks nodepool auto-scale update

更新托管 Kubernetes 群集中 VirtualMachines 代理池的现有自动缩放配置文件。

Core GA
az aks nodepool auto-scale update (aks-preview 扩展)

更新托管 Kubernetes 群集中 VirtualMachines 代理池的现有自动缩放配置文件。

扩展 GA

az aks nodepool auto-scale add

将新的自动缩放配置文件添加到托管 Kubernetes 群集中的 VirtualMachines 代理池。

az aks nodepool auto-scale add --cluster-name
                               --max-count
                               --min-count
                               --name --nodepool-name
                               --node-vm-size
                               --resource-group
                               [--acquire-policy-token]
                               [--change-reference]
                               [--no-wait]

示例

将自动缩放配置文件添加到 VirtualMachines 代理池

az aks nodepool auto-scale add -g MyResourceGroup --cluster-name MyMC --name MyNodePool --node-vm-size Standard_D2s_v3 --min-count 3 --max-count 5

必需参数

--cluster-name

群集名称。

--max-count

自动缩放的最大节点数。

--min-count

自动缩放的最小节点数。

--name --nodepool-name -n

节点池名称。

--node-vm-size

自动缩放配置文件的 VM 大小。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

可选参数

以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。

--acquire-policy-token

为此资源操作自动获取Azure Policy令牌。

属性 值
参数组: Global Policy Arguments
--change-reference

此资源操作的相关更改引用 ID。

属性 值
参数组: Global Policy Arguments
--no-wait

不等待长时间运行的操作完成。

属性 值
默认值: False
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性 值
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

属性 值
默认值: False
--output -o

输出格式。

属性 值
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性 值
默认值: False

az aks nodepool auto-scale add (aks-preview 扩展)

将新的自动缩放配置文件添加到托管 Kubernetes 群集中的 VirtualMachines 代理池。

az aks nodepool auto-scale add --cluster-name
                               --max-count
                               --min-count
                               --name --nodepool-name
                               --node-vm-size
                               --resource-group
                               [--acquire-policy-token]
                               [--change-reference]
                               [--no-wait]

示例

将自动缩放配置文件添加到 VirtualMachines 代理池

az aks nodepool auto-scale add -g MyResourceGroup --cluster-name MyMC --name MyNodePool --node-vm-size Standard_D2s_v3 --min-count 3 --max-count 5

必需参数

--cluster-name

群集名称。

--max-count
预览

自动缩放的最大节点数。

--min-count
预览

自动缩放的最小节点数。

--name --nodepool-name -n

节点池名称。

--node-vm-size
预览

自动缩放配置文件的 VM 大小。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

可选参数

以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。

--acquire-policy-token

为此资源操作自动获取Azure Policy令牌。

属性 值
参数组: Global Policy Arguments
--change-reference

此资源操作的相关更改引用 ID。

属性 值
参数组: Global Policy Arguments
--no-wait

不等待长时间运行的操作完成。

属性 值
默认值: False
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性 值
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

属性 值
默认值: False
--output -o

输出格式。

属性 值
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性 值
默认值: False

az aks nodepool auto-scale delete

从托管 Kubernetes 群集中的 VirtualMachines 代理池中删除现有的自动缩放配置文件。

az aks nodepool auto-scale delete --cluster-name
                                  --current-node-vm-size
                                  --name --nodepool-name
                                  --resource-group
                                  [--acquire-policy-token]
                                  [--change-reference]
                                  [--no-wait]
                                  [--yes]

示例

从 VirtualMachines 代理池中删除自动缩放配置文件

az aks nodepool auto-scale delete -g MyResourceGroup --cluster-name MyMC --name MyNodePool --current-node-vm-size Standard_D2s_v3

必需参数

--cluster-name

群集名称。

--current-node-vm-size

要删除的自动缩放配置文件的 VM 大小。

--name --nodepool-name -n

节点池名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

可选参数

以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。

--acquire-policy-token

为此资源操作自动获取Azure Policy令牌。

属性 值
参数组: Global Policy Arguments
--change-reference

此资源操作的相关更改引用 ID。

属性 值
参数组: Global Policy Arguments
--no-wait

不等待长时间运行的操作完成。

属性 值
默认值: False
--yes -y

不请求确认。

属性 值
默认值: False
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性 值
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

属性 值
默认值: False
--output -o

输出格式。

属性 值
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性 值
默认值: False

az aks nodepool auto-scale delete (aks-preview 扩展)

从托管 Kubernetes 群集中的 VirtualMachines 代理池中删除现有的自动缩放配置文件。

az aks nodepool auto-scale delete --cluster-name
                                  --current-node-vm-size
                                  --name --nodepool-name
                                  --resource-group
                                  [--acquire-policy-token]
                                  [--change-reference]
                                  [--no-wait]

示例

从 VirtualMachines 代理池中删除自动缩放配置文件

az aks nodepool auto-scale delete -g MyResourceGroup --cluster-name MyMC --name MyNodePool --current-node-vm-size Standard_D2s_v3

必需参数

--cluster-name

群集名称。

--current-node-vm-size
预览

要删除的自动缩放配置文件的 VM 大小。

--name --nodepool-name -n

节点池名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

可选参数

以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。

--acquire-policy-token

为此资源操作自动获取Azure Policy令牌。

属性 值
参数组: Global Policy Arguments
--change-reference

此资源操作的相关更改引用 ID。

属性 值
参数组: Global Policy Arguments
--no-wait

不等待长时间运行的操作完成。

属性 值
默认值: False
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性 值
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

属性 值
默认值: False
--output -o

输出格式。

属性 值
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性 值
默认值: False

az aks nodepool auto-scale update

更新托管 Kubernetes 群集中 VirtualMachines 代理池的现有自动缩放配置文件。

az aks nodepool auto-scale update --cluster-name
                                  --current-node-vm-size
                                  --name --nodepool-name
                                  --resource-group
                                  [--acquire-policy-token]
                                  [--change-reference]
                                  [--max-count]
                                  [--min-count]
                                  [--no-wait]
                                  [--node-vm-size]

示例

更新 VirtualMachines 代理池中的现有自动缩放配置文件

az aks nodepool auto-scale update -g MyResourceGroup --cluster-name MyMC --name MyNodePool --current-node-vm-size Standard_D2s_v3 --node-vm-size Standard_D8s_v3 --min-count 2 --max-count 4

必需参数

--cluster-name

群集名称。

--current-node-vm-size

要更新的自动缩放配置文件的当前 VM 大小。

--name --nodepool-name -n

节点池名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

可选参数

以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。

--acquire-policy-token

为此资源操作自动获取Azure Policy令牌。

属性 值
参数组: Global Policy Arguments
--change-reference

此资源操作的相关更改引用 ID。

属性 值
参数组: Global Policy Arguments
--max-count

自动缩放的最大节点数。

--min-count

自动缩放的最小节点数。

--no-wait

不等待长时间运行的操作完成。

属性 值
默认值: False
--node-vm-size

自动缩放配置文件的新 VM 大小。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性 值
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

属性 值
默认值: False
--output -o

输出格式。

属性 值
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性 值
默认值: False

az aks nodepool auto-scale update (aks-preview 扩展)

更新托管 Kubernetes 群集中 VirtualMachines 代理池的现有自动缩放配置文件。

az aks nodepool auto-scale update --cluster-name
                                  --current-node-vm-size
                                  --name --nodepool-name
                                  --resource-group
                                  [--acquire-policy-token]
                                  [--change-reference]
                                  [--max-count]
                                  [--min-count]
                                  [--no-wait]
                                  [--node-vm-size]

示例

更新 VirtualMachines 代理池中的现有自动缩放配置文件

az aks nodepool auto-scale update -g MyResourceGroup --cluster-name MyMC --name MyNodePool --current-node-vm-size Standard_D2s_v3 --node-vm-size Standard_D8s_v3 --min-count 2 --max-count 4

必需参数

--cluster-name

群集名称。

--current-node-vm-size
预览

要更新的自动缩放配置文件的当前 VM 大小。

--name --nodepool-name -n

节点池名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

可选参数

以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。

--acquire-policy-token

为此资源操作自动获取Azure Policy令牌。

属性 值
参数组: Global Policy Arguments
--change-reference

此资源操作的相关更改引用 ID。

属性 值
参数组: Global Policy Arguments
--max-count
预览

自动缩放的最大节点数。

--min-count
预览

自动缩放的最小节点数。

--no-wait

不等待长时间运行的操作完成。

属性 值
默认值: False
--node-vm-size
预览

自动缩放配置文件的新 VM 大小。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性 值
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

属性 值
默认值: False
--output -o

输出格式。

属性 值
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性 值
默认值: False