Azure Kubernetes - ' az acs创造'超过免费帐户配额

时间:2017-08-15 20:08:43

标签: azure-container-service

尝试为Azure容器服务执行等效的MongoDB on GKE blog post,但在第一个障碍时失败。我的博文基于使用每个云提供商的免费套餐/帐户中提供的配额,以帮助新用户在继续使用付费套餐之前评估选项。但是,如果创建了一个Azure免费帐户,我似乎无法创建一个保持在"核心限制之下的k8s群集。 (我假设意味着保持在等于" vCPU"的免费阈值下,在这种情况下)。

当我执行以下操作时:

az acs create --orchestrator-type kubernetes --resource-group MongoResourceGroup --name MongoK8sCluster --generate-ssh-keys

结果是:

Deployment failed. { "code": "BadRequest", "message": "An error has occurred in subscription 0657d162-d822-48f5-bbe9-4bcaac4f40e4, zesourceGroup: MongoResourceGroup request: Provisioning of resource(s) for container service MongoK8sCluster in resource group MongoResourceGroup failed. Message: {\n  \"code\": \"QuotaExceeded\",\n  \"message\": \"Provisioning of resource(s) for container service MongoK8sCluster in resource group MongoResourceGroup failed. Message: Operation results in exceeding quota limits of Core. Maximum allowed: 4, Current in use: 0, Additional requested: 8.. Details: \"\n }. Details: <no value>."

我试图指定一种较小类型的虚拟机,但我似乎没有达到目标:

az acs create --orchestrator-type kubernetes --resource-group MongoResourceGroup --name MongoK8sCluster --agent-vm-size Standard_A0 --generate-ssh-keys

Deployment failed. { "code": "BadRequest", "message": "An error has occurred in subscription 0657d162-d822-48f5-bbe9-4bcaac4f40e4, resourceGroup: MongoResourceGroup request: Provisioning of resource(s) for container service MongoK8sCluster in resource group MongoResourceGroup failed. Message: {\n  \"code\": \"QuotaExceeded\",\n  \"message\": \"Provisioning of resource(s) for container service MongoK8sCluster in resource group MongoResourceGroup failed. Message: Operation results in exceeding quota limits of Core. Maximum allowed: 4, Current in use: 0, Additional requested: 5.. Details: \"\n }. Details: <no value>.

有关让k8s示例项目核心数量下降到足以在免费帐户阈值范围内的任何建议吗?

2 个答案:

答案 0 :(得分:1)

根据此处的文档https://docs.microsoft.com/en-us/cli/azure/acs#create,默认代理计数为3,默认master-vm-size为标准D2_v2。这使得核心要求为

3(agents)*1(core) + 1(master)*2(core) = 5

由于您有4个可用核心,因此您应该尝试设置:

 1. agent-count to be 3
 2. agent-vm-size to be Standard_A0

 1. agent-count to be 1
 2. agent-vm-size to be Standard_D11_v2

我更喜欢选项(2),因为这将在代理节点上提供足够的内存和IOPS。保持master-vm-size的默认值为Standard D2_v2,因为etcd和kubenetes容器需要足够的内存来进行操作。

答案 1 :(得分:0)

使用以下配置会很有帮助。

  • - master-count 1 =&gt; Standard_A2(2 cpu)=&gt; 2 cpu
  • - agent-count 2 =&gt; Standard_A1(1 cpu x 2)=&gt; 2 cpu

此配置将创建一个具有免费帐户限额

的群集
az acs create -n "your-kubernetes-cluster" -g your-resource-group --master-vm-size Standard_A2 --agent-count 2 --agent-vm-size Standard_A1 --dns-prefix kube --orchestrator-type kubernetes --debug