Upgrade Jenkins within a Kubernetes container without losing my data?

5/30/2019

I have a container deployed in a pod by Kubernetes running Jenkins. The container is mounted with a persistent storage volume (AWS Elastic File Store) that's currently storing all of the Jenkins instance's user, configuration, job configurations, etc.

I need to update Jenkins. Normally when I do this, the process wipes out the storage, since the whole container gets re-launched. However, I need to figure out how to do this without losing the data.

How do I update Jenkins without losing the info on the storage volume attached to the container?

-- David
jenkins
kubernetes

1 Answer

5/31/2019

I ended up finding the answer I needed by first reading this article, which helped me understand the underlying concepts: http://www.monkeylittle.com/blog/2017/02/08/adding-persistent-volumes-to-jenkins-with-kubernetes-volumes.html

Then I found this article, which shows you how to do it with EFS, specifically: https://itnext.io/efs-persistent-volumes-on-aws-kubernetes-193e0035bbfb

-- David
Source: StackOverflow