gpt4 book ai didi

azure - 无法使用 Rest API 将 Windows 节点拉取添加到集群

转载 作者:行者123 更新时间:2023-12-03 02:49:05 24 4
gpt4 key购买 nike

我想将 Windows Server 容器添加到 Azure kubernetes 集群。目前,使用 Azure Rest API 来管理集群。但它显示以下错误:

{
"code": "AzureCNIOnlyForWindows",
"message": "Windows agent pools can only be added to AKS clusters using Azure-CNI."
}

{
"location": "location1",
"tags": {
"tier": "production",
"archv2": ""
},
"properties": {
"kubernetesVersion": "",
"dnsPrefix": "dnsprefix1",
"agentPoolProfiles": [
{
"name": "nodepool1",
"count": 3,
"vmSize": "Standard_DS1_v2",
"osType": "Linux"
}
],
"linuxProfile": {
"adminUsername": "*******",
"ssh": {
"publicKeys": [
{
"keyData": "keydata"
}
]
}
},
"networkProfile": {
"loadBalancerSku": "basic"
},
"windowsProfile": {
"adminUsername": "********",
"adminPassword": "************************"
},
"servicePrincipalProfile": {
"clientId": "clientid",
"secret": "secret"
},
"addonProfiles": {},
"enableRBAC": true,
"enablePodSecurityPolicy": true
}
}

{
"code": "AzureCNIOnlyForWindows",
"message": "Windows agent pools can only be added to AKS clusters using Azure-CNI."
}

最佳答案

根据您的问题,我假设您想要将 Windows 节点池添加到 AKS 群集。然后,该错误意味着您没有为 AKS 群集使用 Azure-CNI 网络类型。对于 Windows 节点池,请参见以下内容:

In order to run an AKS cluster that supports node pools for Windows Server containers, your cluster needs to use a network policy that uses Azure CNI (advanced) network plugin.

因此,您的解决方案是创建一个具有 Azure-CNI 网络类型的新 AKS 群集。然后再次添加Windows节点池。看看 Create AKS cluster for Windows node pool through Azure CLI 的步骤。在 REST API 中,您需要在 properties.networkProfile 中设置 networkPlugin 值为 azure。请参阅NetworkPlugin .

关于azure - 无法使用 Rest API 将 Windows 节点拉取添加到集群,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57056477/

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