I am hosting a jupyterhub with kubernetes on my google cloud account. I noticed that google cloud charges me for the runtime that the jupyterhub instance is running.
I am wondering if I can sorta shut down the jupyterhub instance or the kubernetes when we are not using the jupyterhub to save money?
If I restart the instance, will the data be whiped out? I want to do a experiment on this but I am afraid of doing something inreversible.
Also, where can I learn more about the adminstration tips about using google cloud? Thanks!
You can resize your GKE cluster to "0", when you don't need it, with the below command
cloud container clusters resize CLUSTERNAME --size=0
Then you won't be charged, GKE charges only for worker nodes and not for master nodes.
And if you want to make sure your data is persistent after each time you are scaling your cluster, then you will need to use gcePersistentDisk. You can create PD using gcloud before mounting it to your deployment.
gcloud compute disks create --size=500GB --zone=us-central1-a my-data-disk
Then you can configure your Pod configuration like in example here
Just make sure to mount all necessary paths of containers on Persistent Disk.
For more information for Kubernetes Engine pricing check