簡體   English   中英

將更多節點添加到ACS上的Kubernetes集群

[英]Add more nodes to Kubernetes cluster on ACS

我認為該命令應該可以幫助我擴展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.

az cli scale命令的較舊版本中存在一個錯誤,該錯誤會嘗試發送部分ContainerServiceServicePrincipalProfile,並且az cli的內部驗證會導致請求失敗。 我建議確保您拉最新的docker映像或更新您的pip安裝。 我最近在最新的docker鏡像中成功使用了此命令。

傑克(ACS團隊的一名開發人員)

在GA版本(2017年2月22日)之前創建的任何ACS Kubernetes群集將無法按比例擴大/縮小。

使用以下模板版本,我可以使用Azure Portal縮放應用程序。 您必須等待幾分鍾才能在kubectl get節點中進行更新。 https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json

通過輸出,您必須創建服務主體ID和密碼,並提供它以修改容器服務資源。 請參閱https://docs.microsoft.com/zh-cn/cli/azure/create-an-azure-service-principal-azure-cli?view=azure-cli-latest中的更多內容。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM