What happens to Jenkins volume in scenario where Jenkins pod is redeployed to another worker node? I assume in this example Jenkins volume (Jenkins state/data) persists only on worker node where it was deployed and not across the cluster. So when pod will be redeployed, all state will be lost?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

1 answer

Hi, yes, you are correct. If the pod get redeployed, the volume data would be lost in this case. To make the data persist, you can use a volume backed by something like NFS or a CSI driver. Here is a nice tutorial that talks about using NFS with DOKS: https://www.digitalocean.com/community/tutorials/how-to-set-up-readwritemany-rwx-persistent-volumes-with-nfs-on-digitalocean-kubernetes

by John Kwiatkoski
With the digitalocean-csi, DigitalOcean Block Storage, and the NFS protocol, you can make a ReadWriteMany (RWX) Persistent Volume for Kubernetes. In this tutorial, you will configure dynamic provisioning for NFS volumes within a DigitalOcean Kubernetes (DOKS) cluster, in which the exports are stored on DigitalOcean Block storage volumes. You will then deploy multiple instances of a demo Nginx application and test the data sharing between each instance.
Submit an Answer