I'm editing configMap.yaml in my Helm chart, but when I log in to one of my pods to check if it's being applied, it doesn't reflect my changes. I'm fairly new to Helm charts so any help is appreciated.
Asked
Active
Viewed 2,238 times
2
-
Can you share a snippet of your helm chart config? – Malathi Jul 11 '19 at 01:46
-
See https://stackoverflow.com/questions/37317003/restart-pods-when-configmap-updates-in-kubernetes – Pierre B. Jul 11 '19 at 13:29
2 Answers
0
For updating your ConfigMap you can also use kubectl patch command if you find it more fitting for you. Documentation regarding it can be found here.
For applying the changes there is a very useful tool called Reloader.
Reloader can watch changes in ConfigMap and Secret and do rolling upgrades on Pods with their associated DeploymentConfigs, Deployments, Daemonsets and Statefulsets.
Please let me know if that helped.
Wytrzymały Wiktor
- 11,492
- 5
- 29
- 37
-1
After you edited cm, should restart you pod to reload new value.
- edit yaml file.
kubectl apply -f cm.yamlkubectl delete po your-pod -n your-nsif controlled by a controller. If just pod,kubectl delete -f pod.yamlthenkubectl create -f pod.yaml.
FakeAlcohol
- 860
- 7
- 28
-
When I do this I'm getting a parsing error converting YAML to JSON. It points to a specific line where I'm using a template file to define a name. How do I debug this? – Alan C Jul 11 '19 at 13:23
-
If you just modified the value, it shouldn't get an error, if you add new k-v, notice the space and quotation marks. – FakeAlcohol Jul 11 '19 at 13:33