Move Jenkins config from one Kubernetes cluster to another

11/16/2020

I have inherited a Jenkins installation which is used by multiple remote teams, and running on an Amazon EKS cluster. For reasons that are not really relevant, I need to move this Jenkins workload to a new EKS cluster.

Deploying jenkins itself is not a major issue, I am doing so using helm. The persistence of the existing jenkins deployment is bound to an Amazon EBS volume, the persistence of the new deployment will also be. The mount point will be /var/jenkins_home

I'm trying to find a simple way of migrating everything from the current jenkins installation and configuration to the new one. This includes mainly:

Authorization Strategy (RBAC) Jobs Plugins Cloud and Agent Config

I know that everything required is most likely in Jenkins Home. Could I in theory just dump out the current Jenkins Home folder and import into the new running jenkins container using kubetl cp or something like that? Is there an easier way? Is this unsafe in some way?

-- Molenpad
amazon-eks
jenkins
kubernetes

0 Answers