在ACS上向Kubernetes集群添加更多节点

时间:2017-03-09 22:00:29

标签: azure kubernetes azure-container-service

我认为这个命令应该帮助我在Azure容器服务上扩展我的单个代理k8s集群:

az acs scale --name krish_acs_cluster_west --new-agent-count 2 --resource-group krish_res_grp_west --debug --output json

但是,它没有按预期工作,我得到一个错误日志:

requests.packages.urllib3.connectionpool : Starting new HTTPS connection (1): management.azure.com
requests.packages.urllib3.connectionpool : https://management.azure.com:443 "GET /subscriptions/1225d95b-e76d-4d21-90a0-2f137dee9c84/resourceGroups/krish_res_grp_west/providers/Microsoft.ContainerService/containerServices/krish_acs_cluster_west?api-version=2017-01-31 HTTP/1.1" 200 None
msrest.http_logger : Response status: 200 
msrest.http_logger : Response headers:
msrest.http_logger :     'Cache-Control': 'no-cache'
msrest.http_logger :     'Pragma': 'no-cache'
msrest.http_logger :     'Transfer-Encoding': 'chunked'
msrest.http_logger :     'Content-Type': 'application/json; charset=utf-8'
msrest.http_logger :     'Content-Encoding': 'gzip'
msrest.http_logger :     'Expires': '-1'
msrest.http_logger :     'Vary': 'Accept-Encoding'
msrest.http_logger :     'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
msrest.http_logger :     'x-ms-served-by': '1b39334a-f523-4de8-b14d-738ab830ba48_131305327966325140'
msrest.http_logger :     'x-ms-request-id': '5fc2db3e-a70c-4403-b761-60872cb099f9'
msrest.http_logger :     'Server': 'Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0'
msrest.http_logger :     'x-ms-ratelimit-remaining-subscription-reads': '14581'
msrest.http_logger :     'x-ms-correlation-request-id': 'f1048446-30b4-42f5-968d-08004a0472c6'
msrest.http_logger :     'x-ms-routing-request-id': 'WESTEUROPE:20170309T214442Z:f1048446-30b4-42f5-968d-08004a0472c6'
msrest.http_logger :     'Date': 'Thu, 09 Mar 2017 21:44:42 GMT'
msrest.http_logger : Response content:
msrest.http_logger : Body contains chunked data.
msrest.exceptions : Parameter 'ContainerServiceServicePrincipalProfile.secret' can not be None.
Parameter 'ContainerServiceServicePrincipalProfile.secret' can not be None.

3 个答案:

答案 0 :(得分:2)

旧版本的az cli scale命令中存在一个错误,它会尝试发送部分ContainerServiceServicePrincipalProfile,并且az cli的内部valdiation将使请求失败。我建议您确保拉出最新的docker镜像或更新pip install。我最近使用最新的docker镜像成功使用了这个命令。

杰克(ACS团队的开发人员)

答案 1 :(得分:0)

在GA版本(2017年2月22日)之前创建的任何ACS Kubernetes群集都无法向上/向下扩展。

答案 2 :(得分:0)

使用以下模板版本,我可以使用Azure Portal扩展/缩小应用程序。您必须等待几分钟才能获得kubectl get节点的更新。 https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json

根据您的输出,您必须创建服务主体ID和机密,并提供它以修改容器服务资源。请参阅https://docs.microsoft.com/en-us/cli/azure/create-an-azure-service-principal-azure-cli?view=azure-cli-latest

中的详情
相关问题