You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用Azure CLI添加AKS节点池时--aks-custom-headers参数报错

问题解决:添加AKS Windows节点池时参数错误

错误原因分析

  1. 命令中--aks-custom-headers参数的取值末尾多了一个逗号,导致Azure CLI无法正确解析该参数
  2. 使用的Kubernetes 1.20.5版本过旧,对应Azure CLI版本大概率不支持WindowsContainerRuntime=containerd这个自定义头配置

解决步骤

  • 修正参数格式:删除WindowsContainerRuntime=containerd后面的多余逗号,确保参数格式合法
  • 升级Azure CLI到最新版本:旧版本CLI未适配Windows节点池使用containerd的配置参数,执行命令完成升级:
    az upgrade
    
  • (可选)升级Kubernetes版本:Kubernetes 1.20.x已不在官方支持范围内,建议将集群和节点池版本升级到1.23及以上,获得更稳定的兼容性与技术支持

修正后的完整命令示例

az aks nodepool add --resource-group resource-group-name  --cluster-name [cluster] --os-type Windows --name nodepool --node-vm-size Standard_D4s_v3 --kubernetes-version 1.23.12 --aks-custom-headers WindowsContainerRuntime=containerd --node-count 1

内容的提问来源于stack exchange,提问作者Anandaraj

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.27 03:47:03