gpt4 book ai didi

azure - 无法将点节点池添加到 Azure Kubernetes 集群

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

无法将点节点池添加到 Azure Kubernetes 集群

AWS-CLI

azure-cli                         2.12.0

core 2.12.0
telemetry 1.0.6

Extensions:
aks-preview 0.4.63

按照 Microsoft 网站上的说明进行操作:https://learn.microsoft.com/en-us/azure/aks/spot-node-pool

运行以下内容

# Create a resource group in East US
az group create --name myResourceGroup --location westus2

# Create a basic single-node AKS cluster
az aks create \
--resource-group myResourceGroup \
--name myAKSCluster \
--vm-set-type VirtualMachineScaleSets \
--node-count 1 \
--generate-ssh-keys \
--load-balancer-sku standard

az aks get-credentials --resource-group myResourceGroup --name myAKSCluster

az aks nodepool add \
--resource-group myResourceGroup \
--cluster-name myAKSCluster \
--name spotnodepool \
--priority Spot \
--spot-max-price -1 \
--eviction-policy Delete \
--node-vm-size Standard_D2as_v4 \
--node-count 1

出现以下错误:错误代码:

ValidationError: Operation failed with status: 'Bad Request'. Details: Provisioning of resource(s) for Agent Pool spotnodepool failed. Error: {
"code": "InvalidTemplateDeployment",
"message": "The template deployment failed with error: 'The resource with id: '/subscriptions/REDACTED/resourceGroups/MC_myResourceGroup_myAKSCluster_westus2/providers/Microsoft.Compute/virtualMachineScaleSets/aks-REDACTED-vmss' failed validation with message: 'The requested size for resource '/subscriptions/REDACTED/resourceGroups/MC_myResourceGroup_myAKSCluster_westus2/providers/Microsoft.Compute/virtualMachineScaleSets/aks-REDACTED-vmss' is currently not available in location 'westus2' zones '' for subscription 'REDACTED'. Please try another size or deploy to a different location or zones. See https://aka.ms/azureskunotavailable for details.'.'."
}

我尝试过其他 AZ 区域、useast、uswest2 等,但没有成功

如果我运行以下命令,它将起作用:

az aks nodepool add \
--resource-group myResourceGroup \
--cluster-name myAKSCluster \
--name mynodepool \
--node-count 1

现货节点池不支持吗?它在官方文档中:https://learn.microsoft.com/en-us/cli/azure/ext/aks-preview/aks/nodepool?view=azure-cli-latest

最佳答案

我刚刚意识到这不是 AKS 或 Spot 问题。这是一个订阅问题。在文档 ( https://learn.microsoft.com/en-us/azure/virtual-machines/spot-vms#limitations ) 中,它表示仅允许按量付费订阅使用竞价实例。我最近刚刚升级到即用即付模式,但我的 OfferID 仍然停留在“免费试用”状态 - 我只需要耐心等待它转换

关于azure - 无法将点节点池添加到 Azure Kubernetes 集群,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64012800/

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