gpt4 book ai didi

azure - ARM AKS 必须定义至少一个系统池

转载 作者:行者123 更新时间:2023-12-02 23:02:31 25 4
gpt4 key购买 nike

我正在使用 ARM 脚本创建 AKS 群集。目标是从 0 开始创建具有所有所需配置 VN、NGS 和 AgentPool 的集群。这是我的 ManagedCluster ARM 模板:

  {
"apiVersion": "2020-03-01",
"name": "[parameters('clusterName')]",
"type": "Microsoft.ContainerService/managedClusters",
"location": "[parameters('templateSettings').location]",
"properties": {
"kubernetesVersion": "[parameters('kubernetesVersion')]",
"enableRBAC": true,
"dnsPrefix": "[parameters('dnsPrefix')]",
"agentPoolProfiles": [
{
"name": "nodepool",
"count": "[parameters('agentCount')]",
"vmSize": "[parameters('agentVMSize')]",
"osDiskSizeGB": "[parameters('osDiskSizeGB')]",
"vnetSubnetID": "[parameters('vnetSubnetID')]",
"maxPods": 110,
"minCount": 1,
"maxCount": 100,
"enableAutoScaling": true,
"type": "VirtualMachineScaleSets",
"storageProfile": "ManagedDisks"
}
],
"servicePrincipalProfile": {
"ClientId": "[parameters('servicePrincipalClientId')]",
"Secret": "[parameters('servicePrincipalClientSecret')]"
},
"networkProfile": {
"loadBalancerSku": "standard",
"networkPlugin": "kubenet"
},
"addonProfiles": {
"httpApplicationRouting": {
"enabled": true
},
"omsagent": {
"enabled": true,
"config": {
"logAnalyticsWorkspaceResourceID": "[resourceId('Microsoft.OperationalInsights/workspaces', parameters('workspaceName'))]"
}
}
},
"nodeResourceGroup": "[concat(resourceGroup().name, '-nodes')]"
}
}

在部署到 Azure 时,我收到此错误,文档中没有提到该错误:

{
"error": {
"code": "InvalidTemplateDeployment",
"message": "The template deployment 'AksDeployment' is not valid according to the validation procedure. The tracking id is 'b68b569d-**********************'. See inner errors for details.",
"details": [
{
"code": "MustDefineAtLeastOneSystemPool",
"message": "Provisioning of resource(s) for container service aks-arm-test in resource group rg-arm-test failed. Message: {\n \"code\": \"MustDefineAtLeastOneSystemPool\",\n \"message\": \"Must define at least one system pool.\"\n }. Details: "
}
]
}
}

最佳答案

实际上,您可以将其标记为系统:

{
"name": "nodepool",
"count": "[parameters('agentCount')]",
"vmSize": "[parameters('agentVMSize')]",
"osDiskSizeGB": "[parameters('osDiskSizeGB')]",
"vnetSubnetID": "[parameters('vnetSubnetID')]",
"maxPods": 110,
"minCount": 1,
"maxCount": 100,
"enableAutoScaling": true,
"type": "VirtualMachineScaleSets",
"storageProfile": "ManagedDisks",
"mode" : "System"
}

https://learn.microsoft.com/en-us/azure/aks/use-system-pools#show-details-for-your-node-pool

旧的 API 版本应该也可以工作

关于azure - ARM AKS 必须定义至少一个系统池,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61362613/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com