The proper way to stop and start a cluster

280 views
Skip to first unread message

Asanka Sanjaya Herath

unread,
Sep 25, 2017, 2:47:55 AM9/25/17
to gce-discussion
Hi All,

We have up and running gcloud container cluster(Kuberentes based) which hosts set of microservices and some other programs.  That is our production cluster. Now we are trying to duplicate the same cluster to set up a staging environment. But we don't need that second cluster up and running 24x7 because of cost-cutting concerns. I couldn't find any gcloud command to suspend the cluster and start it later. Is there a proper way that we can achieve this goal? Any help is appreciated.

Paolo Mainardi

unread,
Sep 25, 2017, 5:39:22 AM9/25/17
to gce-discussion
You can't stop the cluster, but you can:

1) Set the node autoscaling min-node to 0, this is true starting with kube 1.7 (https://cloud.google.com/container-engine/docs/cluster-autoscaler#minimum_and_maximum_node_pool_size)
2) Set all the deployments to scale to 0

This will terminate any running VMs and you basically pay nothing.

Carlos (Cloud Platform Support)

unread,
Sep 25, 2017, 1:27:45 PM9/25/17
to gce-discussion
You can also set your cluster size to zero as explained here by using “gcloud container clusters resize $CLUSTER_NAME --size=0

Asanka Sanjaya Herath

unread,
Sep 26, 2017, 5:25:59 AM9/26/17
to Carlos (Cloud Platform Support), paolo.m...@sparkfabrik.com, gce-discussion
Thanks, Paolo and Carlos, that was good information. I'll change the number of cluster instances to 0 when it is not being used.

On Mon, Sep 25, 2017 at 10:57 PM, 'Carlos (Cloud Platform Support)' via gce-discussion <gce-dis...@googlegroups.com> wrote:
You can also set your cluster size to zero as explained here by using “gcloud container clusters resize $CLUSTER_NAME --size=0

--
© 2017 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
 
Email preferences: You received this email because you signed up for the Google Compute Engine Discussion Google Group (gce-discussion@googlegroups.com) to participate in discussions with other members of the Google Compute Engine community and the Google Compute Engine Team.
---
You received this message because you are subscribed to a topic in the Google Groups "gce-discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/gce-discussion/4joBaxPF_1k/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gce-discussion+unsubscribe@googlegroups.com.
To post to this group, send email to gce-discussion@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gce-discussion/87f0db08-a0e0-4942-9a18-b93d81a09f77%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Thanks,

Asanka Sanjaya Herath

Software Engineer | Zone24x7

Reply all
Reply to author
Forward
0 new messages