2017-03-09 115 views
0

我觉得这个命令应该已经帮我扩大了我的单剂K8S Azure上的集装箱服务集群:加入Kubernetes集群多个节点ACS

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. 
+0

你试过其他方法吗? – 4c74356b41

+0

这个问题在这里跟踪:https://github.com/Azure/azure-cli/issues/1303虽然似乎固定,我只是转载它。 – dimi

+0

您也可以使用acs-engine来创建您的群集,然后修改apimodel.json以获得更多节点。你可以在我的文章“动态添加节点”部分阅读更多关于它的内容:http://brusmx.github.io/2016-11-18-deis-on-azure/ –

回答

0

的GA版本之前创建的任何ACS Kubernetes集群(2017年2月22日)将不能够比例放大/缩小。

2

在早期版本的az cli scale命令中会有一个错误,它会尝试发送部分ContainerServiceServicePrincipalProfile,并且az cli的内部阈值将会使请求失败。我建议确保你拉最新的码头镜像或更新你的点子安装。我最近用最新的docker镜像成功地使用了这个命令。

杰克(在ACS团队DEV)

0

使用下面的模板版本,我可以比例放大/缩小使用Azure的门户网站应用程序。您必须等待几分钟才能在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