Is there a way for stopping the GKE clusters when not in use and restart them when required?

0 votes
I have created a cluster for R&D purpose using n1-standard-8 machines. It is used in day time, Is there any way to stop the cluster during night time or on weekends ?
Nov 6, 2019 in GCP by anonymous
• 8,200 points
217 views

1 answer to this question.

0 votes

You can simply set the replicas to 0 in the yaml and it'll effectively turn off the cluster. And, it'd then be a fairly simple matter of scaling it back up the same way. 

So, if you wanted to, you could set up a job to run "kubectl apply -f your-deployment-day.yaml" during the day to start the cluster and kubectl apply -f your-development-night.yaml" to stop it during evening and weekends.

answered Nov 6, 2019 by Sirajul
• 45,960 points

Related Questions In GCP

0 votes
1 answer
0 votes
1 answer

Can I create a load balancer with path based routing in GKE?

Yes, it's possible. Note that you simply will use the internal Load balancing (ILB) for ...READ MORE

answered Oct 10, 2019 in GCP by Sirajul
• 45,960 points
105 views