How to make consul to use manually created PersistentVolumeClaim in Helm

11/29/2019

When installing consul using Helm, it expects the cluster to dynamic provison the PersistentVolume requested by consul-helm chart. It is the default behavior.

I have the PV and PVC created manually and need to use this PV to be used by consul-helm charts. Is it posisble to install consul using helm to use manually created PV in kubernetes.

-- arunp
consul
kubernetes
kubernetes-helm

1 Answer

12/5/2019

As @coderanger said

For this to be directly supported the chart author would have to provide helm variables you could set. Check the docs.

As showed on github docs there is no variables to change that.


If You have to change it, You would have to work with consul-statefulset.yaml, this chart provide dynamically volumes for each statefulset pod created.

volumeMounts

volumeClaimTemplates

Use helm fetch to download consul files to your local directory

helm fetch stable/consul --untar

Then i found a github answer with good explain and example about using one PV & PVC in all replicas of Statefulset, so I think it could actually work in consul chart.

-- jt97
Source: StackOverflow