I use gcloud to provision kubernetes clusters, and use container engine to do so.
Aside from the production cluster, I would like to create short-lived clusters, for testing etc'.
Instead of recreating clusters, I would like to have a test cluster and be able to stop/start on demand. Trying to hit "stop" on the vm instances listed at compute engine will make them restart eventually.
What is the proper way to stop & start a test cluster?
The motivation for short lived test clusters is from cost consideration.
To remove a cluster, you can run kubectl --kubeconfig=config-demo config unset clusters. <name> To remove a context, you can run kubectl --kubeconfig=config-demo config unset contexts.
You can temporarily scale the number of nodes in your cluster down to zero by running:
gcloud container clusters resize $CLUSTER_NAME --num-nodes=0
Then scale it back up later by running that with a non-zero value for the size flag.
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