Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

adding offset to kubernetes cluster templates. Adding outputs needed … #366

Merged
merged 1 commit into from
Mar 13, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/kubernetes.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ After completing this walkthrough you will know how to:

## Troubleshooting

Scaling your cluster up or down requires different parameters and template than the create. More details here [Scale up](../examples/scale-up/README.md)

If your cluster is not reachable, you can run the following command to check for common failures.

### Misconfigured Service Principal
Expand Down
24 changes: 24 additions & 0 deletions examples/scale-up/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Microsoft Azure Container Service Engine - Scale up virtual machine availability set agent pools

## Overview

ACS-Engine enables you to add nodes to an existing cluster. For virtual machine scale sets agent pools this is just a simple change to the count number in the parameters file.
This will also work for most availability set agent pools. availability set agent pools that have updated arm resources might run into issues depending on the behavior
of the underlying ARM RP, some of them treat resources in ARM templates as a PUT(replace) some treat them as a PATCH(update). This causes issues
in particular with the Kubernetes Azure driver. It updates the network resources and blindly putting will overwrite Kubernetes's changes and can cause
outages in any services running on the agent pool and/or fail the update deployment (ARM) due contention in updating the resources.
To get around this there is now an Offset parameter on each agent pool. If you want to scale up an existing cluster take the template
you deployed orignally. Update the accompanying parameters file to have the Offset == old count and the Count == new desired number of vms.
example: I originally deployed 5 vms in an agent pool. I want to scale up to 10. I would set Offset==5 and Count == 10. Then deploy the template
in incremental mode. This sadly isn't every change that is needed. We also need to remove the NSG resource and the vnet's dependency on it. The current design of ACS-engine doesn't allow for a seperate update template, so this will have to be a manual step. I have a sample update template here.

Note: the Offset parameter has a default value and is not set for creation.
Shows the use of an update template with that was created with 6 nodes and scaled up to 15
- Example create template **kubernetes_template.json**
- Orignal Parameters **kubernetes_orignal_params.json**
- Example update template **kubernetes_update_template.json**
- Scale up parameters **kubernetes_scale_up_params.json**

To scale down a availability set agent pool the proper way to do it is to first list vms you want to delete and save
their osdisk locations then delete the vms. Then delete the network interfaces and osdisks(note to do this you will
need to get the access keys to the storage accounts, which you can fetch from SRP).
98 changes: 98 additions & 0 deletions examples/scale-up/kubernetes_orignal_params.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
{
"agentpool1Count": {
"value": 3
},
"agentpool1Subnet": {
"value": "10.240.0.0/16"
},
"agentpool1VMSize": {
"value": "Standard_D2_v2"
},
"agentpool2Count": {
"value": 3
},
"agentpool2Subnet": {
"value": "10.240.0.0/16"
},
"agentpool2VMSize": {
"value": "Standard_D2_v2"
},
"apiServerCertificate": {
"value": ""
},
"apiServerPrivateKey": {
"value": ""
},
"caCertificate": {
"value": ""
},
"clientCertificate": {
"value": ""
},
"clientPrivateKey": {
"value": ""
},
"dockerEngineDownloadRepo": {
"value": "https://apt.dockerproject.org/repo"
},
"firstConsecutiveStaticIP": {
"value": "10.240.255.5"
},
"kubeConfigCertificate": {
"value": ""
},
"kubeConfigPrivateKey": {
"value": ""
},
"kubernetesAddonManagerSpec": {
"value": "gcr.io/google_containers/kube-addon-manager-amd64:v6.2"
},
"kubernetesAddonResizerSpec": {
"value": "gcr.io/google_containers/addon-resizer:1.6"
},
"kubernetesDNSMasqSpec": {
"value": "gcr.io/google_containers/kube-dnsmasq-amd64:1.3"
},
"kubernetesDashboardSpec": {
"value": "gcr.io/google_containers/kubernetes-dashboard-amd64:v1.5.1"
},
"kubernetesExecHealthzSpec": {
"value": "gcr.io/google_containers/exechealthz-amd64:1.2"
},
"kubernetesHeapsterSpec": {
"value": "gcr.io/google_containers/heapster:v1.2.0"
},
"kubernetesHyperkubeSpec": {
"value": "gcr.io/google_containers/hyperkube-amd64:v1.5.3"
},
"kubernetesKubeDNSSpec": {
"value": "gcr.io/google_containers/kubedns-amd64:1.7"
},
"kubernetesPodInfraContainerSpec": {
"value": "gcr.io/google_containers/pause-amd64:3.0"
},
"linuxAdminUsername": {
"value": "azureuser"
},
"masterEndpointDNSNamePrefix": {
"value": ""
},
"masterSubnet": {
"value": "10.240.0.0/16"
},
"masterVMSize": {
"value": "Standard_D2_v2"
},
"servicePrincipalClientId": {
"value": ""
},
"servicePrincipalClientSecret": {
"value": ""
},
"sshRSAPublicKey": {
"value": ""
},
"targetEnvironment": {
"value": "AzurePublicCloud"
}
}
104 changes: 104 additions & 0 deletions examples/scale-up/kubernetes_scale_up_params.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
{
"agentpool1Count": {
"value": 10
},
"agentpool1Offset": {
"value": 3
},
"agentpool1Subnet": {
"value": "10.240.0.0/16"
},
"agentpool1VMSize": {
"value": "Standard_D2_v2"
},
"agentpool2Count": {
"value": 5
},
"agentpool2Offset": {
"value": 3
},
"agentpool2Subnet": {
"value": "10.240.0.0/16"
},
"agentpool2VMSize": {
"value": "Standard_D2_v2"
},
"apiServerCertificate": {
"value": ""
},
"apiServerPrivateKey": {
"value": ""
},
"caCertificate": {
"value": ""
},
"clientCertificate": {
"value": ""
},
"clientPrivateKey": {
"value": "="
},
"dockerEngineDownloadRepo": {
"value": "https://apt.dockerproject.org/repo"
},
"firstConsecutiveStaticIP": {
"value": "10.240.255.5"
},
"kubeConfigCertificate": {
"value": ""
},
"kubeConfigPrivateKey": {
"value": ""
},
"kubernetesAddonManagerSpec": {
"value": "gcr.io/google_containers/kube-addon-manager-amd64:v6.2"
},
"kubernetesAddonResizerSpec": {
"value": "gcr.io/google_containers/addon-resizer:1.6"
},
"kubernetesDNSMasqSpec": {
"value": "gcr.io/google_containers/kube-dnsmasq-amd64:1.3"
},
"kubernetesDashboardSpec": {
"value": "gcr.io/google_containers/kubernetes-dashboard-amd64:v1.5.1"
},
"kubernetesExecHealthzSpec": {
"value": "gcr.io/google_containers/exechealthz-amd64:1.2"
},
"kubernetesHeapsterSpec": {
"value": "gcr.io/google_containers/heapster:v1.2.0"
},
"kubernetesHyperkubeSpec": {
"value": "gcr.io/google_containers/hyperkube-amd64:v1.5.3"
},
"kubernetesKubeDNSSpec": {
"value": "gcr.io/google_containers/kubedns-amd64:1.7"
},
"kubernetesPodInfraContainerSpec": {
"value": "gcr.io/google_containers/pause-amd64:3.0"
},
"linuxAdminUsername": {
"value": "azureuser"
},
"masterEndpointDNSNamePrefix": {
"value": ""
},
"masterSubnet": {
"value": "10.240.0.0/16"
},
"masterVMSize": {
"value": "Standard_D2_v2"
},
"servicePrincipalClientId": {
"value": ""
},
"servicePrincipalClientSecret": {
"value": ""
},
"sshRSAPublicKey": {
"value": ""
},
"targetEnvironment": {
"value": "AzurePublicCloud"
}
}