Since last few days, I have come across a pattern where all the Jhub related pods are being evicted with the similar reason like below The node was low on resource: ephemeral-storage. Container hub was using 19192Ki, which exceeds its request of 0.
I am assuming that this is due to not setting up resource quota in pods as the size mentioned in above message is very small (I know similar issue might occur be due to old images not being cleaned after use.)
Every node in our cluster has around 20Gi of storage attached. So resolving this problem should be as simple as setting up ephemeral storage but I can not find documentation to do that. Is it something we allow in config.yaml ? Thanks.
I think (though I’m not 100% sure) this is due to a lack of storage on your Kubernetes hosts. 20GB for a VM seems quite low considering this includes the operating system, temporary files, logs, and Kubernetes containers. For example it’s not unusual for container images to approach 10GB in size.
Thanks for reply @manics. I am using external storage (EFS) where I am storing data from notebook server. So the things which are consuming ephemeral storage must be docker images, logs etc. Can I move that to external storage too?
Short answer: no, EFS users NFS which isn’t suitable for Docker.
Longer answer: maybe, if you provision a block storage device. I’m not familiar with AWS so I don’t know how easy that is to setup on a Kubernetes node, or whether it’s cost effective compared to provisioning a VM with bigger ephemeral storage.
Hey Abdul, I have mentioned the solution above. I would recommend to see what is filling up your ephemeral storage, make decision about what data you need from it. Remove it or move it to PV. I did the same, I added new storage class for NFS based system and moved alot of data from ephemeral storage to PV.
Other solution could be increasing ephemeral storage than 1Gi
Hey Bhushan, thank you for your reply.
You were right, it was using space in folder /opt/bitnami/miniconda, but /opt/bitnami/jupyterhub-singleuser was mounted to PVC.
Anyhow, I also found a way to set ephermal-storage by adding following in hub.configuration within values.yaml
I am glad you were able to resolve it, Abdul. Their code is pretty much self explanatory. I had to write some custom code to override kubespawner. It was pretty straight forward.