Some of our containers run better with memory above the instance type currently deployed in our Container Engine cluster. Is there a recommended practice to rebuild the container engine template for larger instances after the container engine cluster has been created?
For example, go from GCE instances n1-standard-2 to n1-highmem-8 for running containers with above 8GB RAM?
Select the instance and choose Instance state, Stop instance. When prompted for confirmation, choose Stop. It can take a few minutes for the instance to stop. With the instance still selected, choose Actions, Instance settings, Change instance type.
The best way to achieve a zero-downtime upgrade is with a blue/green deployment. This involves creating a new instance of the desired tier, readying it for production, swapping traffic over to it, then terminating the old instance. Then, under AMIs in the sidebar, you can launch a new instance using that image.
Container Engine doesn't currently have an API for doing this, but since it uses a Compute Engine instance group for the nodes in your cluster, you can actually update it without needing GKE's help. In the Developers Console, copy the instance template that looks like "gke--" and modify the machine type in it, then edit the similarly named instance group to use the new template. You can find these options under Compute > Compute Engine > Instance templates
and Compute > Compute Engine > Instance groups
, respectively.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With