2017-03-09 134 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