Add more nodes to Kubernetes cluster on ACS

3/9/2017

I think that this command should have helped me scale up my single agent k8s cluster on Azure Container Service:

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

However, it doesn't work as expected, and I get an error log as:

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.
-- krish7919
azure
azure-container-service
kubernetes

3 Answers

2/15/2018

Using the following template version I could scale up/down the application using Azure Portal. You must wait a few minutes to get updated in kubectl get nodes. https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json

By your output, you must create a service principal ID and secret and provide it to modify the container service resource. See more in https://docs.microsoft.com/en-us/cli/azure/create-an-azure-service-principal-azure-cli?view=azure-cli-latest.

-- Pablo
Source: StackOverflow

3/30/2017

Any ACS Kubernetes clusters created before the GA version (Feb 22, 2017) will not be able to scale up/down.

-- A Howe
Source: StackOverflow

4/5/2017

There is a bug in older versions of the az cli scale command which would try to send a partial ContainerServiceServicePrincipalProfile and the az cli's internal valdiation would fail the request. I'd suggest making sure you pull the latest docker image or update your pip install. I have recently used this command successfully with the lastest docker image.

Jack (a dev on the ACS team)

-- Jack Quincy
Source: StackOverflow