我有一个 AKS "name": "agentpool1",
"properties": {
"provisioningState": "Succeeded",
"orchestratorVersion": "1.17.8",
"count": 3,
"vmSize": "Standard_DS2_v2",
"maxPods": 30,
"osType": "Linux",
"osDiskType": "Ephemeral",
"osDiskSizeGB": 64
是否可以在不重新创建集群的情况下将 "maxPods": 30 更改为 "maxPods": 100。如果你能回答如何,不胜感激。
尝试时出现此错误
The template deployment 'sbstest-deployment' is not valid according to the validation procedure. The tracking id is '70443a7c-8411-49ba-b278-e4fgjhgh'. See inner errors for details.
Details:
PropertyChangeNotAllowed: Provisioning of resource(s) for container service sbstest-aks in resource group sbstest failed. Message: {
"code": "PropertyChangeNotAllowed",
"message": "Changing property 'agentPoolProfile.kubernetesConfig.kubeletConfig.maxPods' is not allowed.",
"target": "agentPoolProfile.kubernetesConfig.kubeletConfig.maxPods"
}. Details:
Check out the troubleshooting guide to see if your issue is addressed: https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/deploy/azure-resource-group-deployment?view=azure-devops#troubleshooting
Task failed while creating or updating the template deployment.
答案 0 :(得分:1)
是否可以在不重新创建集群的情况下将 "maxPods": 30 更改为 "maxPods": 100?
创建新的 AKS 集群时,会自动创建系统节点池,但创建节点池后无法通过 CLI 更改节点污点。
但是,作为替代方法,您可以将所需的 maxPods
create a new node pool 加入您的 AKS 集群。
请注意,您需要将池的 mode
设置为 System
。
然后,delete the the old node pool。
az aks nodepool delete -g myResourceGroup --cluster-name myAKSCluster --name mynodepool --no-wait
此外,我在github中找到了另一种方法。您可以检查这两种方法,看看哪一种更适合您。