Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Resize instance types on Container Engine cluster

Tags:

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?

like image 838
TimK Avatar asked Jul 08 '15 19:07

TimK


People also ask

How do I change instance type?

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.

How do I change instance type without downtime?

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.


1 Answers

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.

like image 177
Alex Robinson Avatar answered Oct 02 '22 04:10

Alex Robinson