Issue
I've installed Jenkins on GKE using Bitnami Chart and it is online.
When I want to adjust it using helm upgrade
, Kubernetes brings up a new instance while leaving the other running (as expected), but the new instance fails to come up with
Warning FailedAttachVolume 18m attachdetach-controller Multi-Attach error for volume "pvc-b3d609b3-ec10-4966-8713-595702220c40" Volume is already used by pod(s) jenkins-9ddcc795c-vflvm
Warning FailedMount 11m kubelet Unable to attach or mount volumes: unmounted volumes=[jenkins-data[], unattached volumes=[default-token-2qsvk jenkins-data]: timed out waiting for the condition
This error makes sense - two instances can't share storage.
If I take down the first instance, then it comes right back. If I helm uninstall
, both instances are deleted including the storage.
What is the proper process to upgrade versions/update chart settings?
Solution
You can delete the deployment of Jenkin first if you will delete the deployment other components will be there along with the storage disk which can reattached to the new deployment
kubectl delete deployments.apps jenkins
https://artifacthub.io/packages/helm/bitnami/jenkins#upgrading
and run command to upgrade the helm chart by updating the value file and using --set.
helm upgrade jenkins bitnami/jenkins --set jenkinsPassword=$JENKINS_PASSWORD --set jenkinsHome=/bitnami/jenkins/jenkins_home
Answered By - Harsh Manvar