Helm install locally but upgrade in pipeline?

12/22/2019

I'm having trouble upgrading helm chart from a pipeline. I run helm install --name refund-robot . from the root directory on my local machine to install the helm chart for the first time. Later I have a pipeline where I update docker image and trigger helm upgrade. In my pipeline I run this command: helm upgrade --install refund-robot . but I keep getting this error:

Release "refund-robot" does not exist. Installing it now.
65 Error: rendered manifests contain a resource that already exists. Unable to continue with install: existing resource conflict: kind: PersistentVolume, namespace: , name: mysql-pv-volume

Which is fair enough. I then tried running helm upgrade refund-robot . and I got:

Error: UPGRADE FAILED: "refund-robot" has no deployed releases

How can I make this work from my pipeline? Do I need to share some config with the pipeline? What's the best way to approach this?

-- davidb
kubernetes-helm
pipeline

1 Answer

12/23/2019

You have to delete the PersistentVolume called mysql-pv-volume from your namespace or use an other name instead.

'kubectl delete pv' command allows you to delete PersistentVolume .

$ kubectl delete pv mysql-pv-volume

Then you will be able to install your app

$ helm install refund-robot .
-- Ridae HAMDANI
Source: StackOverflow