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

az aksarc nodepool

Note

此参考是 Azure CLI 的 aksarc 扩展(版本 2.32.0 或更高版本)的一部分。 该扩展将在首次运行 az aksarc nodepool 命令时自动安装。 了解更多关于扩展的信息。

管理预配群集中的节点池。

命令

名称 说明 类型 Status
az aksarc nodepool add

在预配的群集中添加节点池。

Extension GA
az aksarc nodepool delete

删除预配群集中的节点池。

Extension GA
az aksarc nodepool list

列出预配群集中的所有节点池。

Extension GA
az aksarc nodepool scale

缩放预配群集中的节点池。

Extension GA
az aksarc nodepool show

获取预配群集中的节点池。

Extension GA
az aksarc nodepool update

更新预配群集中的节点池。

Extension GA

az aksarc nodepool add

在预配的群集中添加节点池。

az aksarc nodepool add --cluster-name
                       --name
                       --resource-group
                       [--enable-cluster-autoscaler]
                       [--labels]
                       [--max-count]
                       [--max-pods]
                       [--min-count]
                       [--no-wait]
                       [--node-count]
                       [--node-taints]
                       [--node-vm-size]
                       [--os-sku]
                       [--os-type]
                       [--tags]

示例

AddNodepool

az aksarc nodepool add --name "samplenodepool" --cluster-name "samplecluster" --resource-group "sample-rg"

必需参数

--cluster-name

预配群集的名称。

--name -n

节点池的名称。

--resource-group -g

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

可选参数

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--enable-cluster-autoscaler -e

为预配的群集启用群集自动缩放程序。

属性
默认值: False
--labels

空格分隔的标签:key[=value] [key[=value] ...]。

--max-count

自动缩放的最大节点数。

--max-pods -m

可在节点上运行的 Pod 的最大数目。

--min-count

自动缩放的最小节点数。

--no-wait

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

属性
默认值: False
--node-count -c

在 nodepool 中创建的节点数。

--node-taints

节点池污点的逗号分隔列表。

--node-vm-size

节点池中节点的 VM 大小。

--os-sku

nodepool 中节点的 OS Sku。 选项:“CBLMariner” |“Windows2019” |“Windows2022”。

--os-type

节点池中节点的 OS 类型。 选项:“Linux” |“Windows”。

--tags

空格分隔标记:key[=value] [key[=value] ...]。使用“”清除现有标记。

全局参数
--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 aksarc nodepool delete

删除预配群集中的节点池。

az aksarc nodepool delete --cluster-name
                          --name
                          --resource-group
                          [--no-wait]
                          [--yes]

示例

DeleteNodepool

az aksarc nodepool delete --name "samplenodepool" --cluster-name "samplecluster" --resource-group "sample-rg"

必需参数

--cluster-name

预配群集的名称。

--name -n

节点池的名称。

--resource-group -g

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

可选参数

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--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 aksarc nodepool list

列出预配群集中的所有节点池。

az aksarc nodepool list --cluster-name
                        --resource-group

示例

ListNodepool

az aksarc nodepool list --cluster-name "samplecluster" --resource-group "sample-rg"

必需参数

--cluster-name

预配群集的名称。

--resource-group -g

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

全局参数
--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 aksarc nodepool scale

缩放预配群集中的节点池。

az aksarc nodepool scale --cluster-name
                         --name
                         --resource-group
                         [--no-wait]
                         [--node-count]
                         [--node-vm-size]
                         [--yes]

示例

ScaleNodePoolCount

az aksarc nodepool scale --name "samplenodepool" --cluster-name "samplecluster" --resource-group "sample-rg" --node-count 3

ScaleNodePoolVMSize

az aksarc nodepool scale --name "samplenodepool" --cluster-name "samplecluster" --resource-group "sample-rg" --node-vm-size "Standard_A2_v2"

必需参数

--cluster-name

预配群集的名称。

--name -n

节点池的名称。

--resource-group -g

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

可选参数

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--no-wait

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

属性
默认值: False
--node-count -c

要扩展到节点池中的节点数。

--node-vm-size

节点池中节点的 VM 大小。

--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 aksarc nodepool show

获取预配群集中的节点池。

az aksarc nodepool show --cluster-name
                        --name
                        --resource-group

示例

GetNodepool

az aksarc nodepool show --name "samplenodepool" --cluster-name "samplecluster" --resource-group "sample-rg"

必需参数

--cluster-name

预配群集的名称。

--name -n

节点池的名称。

--resource-group -g

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

全局参数
--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 aksarc nodepool update

更新预配群集中的节点池。

az aksarc nodepool update --cluster-name
                          --name
                          --resource-group
                          [--disable-cluster-autoscaler]
                          [--enable-cluster-autoscaler]
                          [--labels]
                          [--max-count]
                          [--min-count]
                          [--no-wait]
                          [--node-taints]
                          [--update-cluster-autoscaler]

示例

UpdateNodepool

az aksarc nodepool update --name "samplenodepool" --cluster-name "samplecluster" --resource-group "sample-rg" --disable-cluster-autoscaler

必需参数

--cluster-name

预配群集的名称。

--name -n

节点池的名称。

--resource-group -g

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

可选参数

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--disable-cluster-autoscaler -d

为预配的群集禁用群集自动缩放程序。

属性
默认值: False
--enable-cluster-autoscaler -e

为预配的群集启用群集自动缩放程序。

属性
默认值: False
--labels

空格分隔的标签:key[=value] [key[=value] ...]。传递空字符串以清除标签。

--max-count

自动缩放的最大节点数。

--min-count

自动缩放的最小节点数。

--no-wait

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

属性
默认值: False
--node-taints

节点池污点的逗号分隔列表。 传递空字符串以清除污点。

--update-cluster-autoscaler -u

更新预配群集的群集自动缩放程序。

属性
默认值: 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