On kubernetes helm how to replace a pod with new config values
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.
Introduction
With Helm, you do not usually replace a pod directly. You update the Helm release values, let Helm render new Kubernetes manifests, and then let the owning controller, such as a Deployment or StatefulSet, roll out new pods that match the updated configuration.
Think in Terms of Controllers, Not Individual Pods
A pod created by a Deployment is disposable. If you delete it manually, Kubernetes will create a replacement that still uses the current Deployment spec. That means changing the live pod itself does not solve a configuration problem in a durable way.
The durable change must happen in one of these places:
- The Helm values passed into the chart.
- The templates inside the chart.
- The referenced ConfigMap or Secret together with rollout logic.
Once the rendered manifest changes, the controller replaces pods according to its rollout strategy.
Update Values with helm upgrade
The standard workflow is:
If you only need to change one or two values, you can override them inline:
After the upgrade, inspect the rollout:
If the Deployment template changed, Kubernetes will create a new ReplicaSet and rotate the pods.
Make Sure Config Changes Trigger a Rollout
One subtle issue is that updating a ConfigMap or Secret does not always restart pods automatically. If the pod template in the Deployment remains unchanged, Kubernetes may keep running the old pods.
A common Helm pattern is to place a checksum annotation on the pod template so that config file changes change the template hash too.
Example template snippet:
When the ConfigMap template content changes, the checksum changes, the pod template changes, and Kubernetes performs a rollout.
When Deleting a Pod Is Useful
Deleting a pod can still be useful, but only in a narrow sense. If the Deployment spec already contains the correct values and you simply want the controller to recreate a stuck pod, then deleting it is fine:
Kubernetes will replace it using the current controller specification. What deletion will not do is apply new Helm values that have not been upgraded into the release yet.
Reuse and Compare Existing Values Carefully
When updating a release, be deliberate about where values come from. helm upgrade --reuse-values can help if you want to keep existing values and override only a subset:
It is also often helpful to preview changes before applying them:
That helps you confirm whether the pod template will actually change.
Common Pitfalls
The most common mistake is editing or deleting a pod and expecting Helm state to change. Pods are outputs of the desired state, not the source of truth.
Another issue is updating a ConfigMap but forgetting to wire that change into the pod template. Without a template change, the controller may not restart anything.
People also use helm upgrade with the wrong values file, then wonder why the replacement pod still has the old settings. Always confirm the effective values with helm get values and the rendered manifests if needed.
Finally, do not ignore rollout status. A Helm upgrade can succeed as a release operation while the workload rollout still fails afterward.
Summary
- Do not replace Helm-managed pods by editing them directly.
- Change the Helm release values and apply them with
helm upgrade. - Let the owning controller roll out new pods from the updated pod template.
- Use checksum annotations when ConfigMap or Secret changes should trigger restarts.
- Delete individual pods only when you want Kubernetes to recreate them from the already-correct spec.
Related reading
- One istio-ingressgateway and multiple TLS gateways
- One or more containers do not have resource limits - warning in VS Code Kubernetes tools
- OpenShift access service in other namespace without network join
- Openshift .kubeconfig file and certificate authentication
- On the Kafka Java consumer client, is there a way to monitor health status as opposed to simply no-data?
- On what CPU cores are my Python processes running?
- Openshift pods not being deleted
- OpenShift Route Certificate auto renew

System Design Fundamentals
Build a strong foundation in designing scalable, reliable distributed systems.
View the courseTrack what you have practised
A free account saves your progress, solutions and study plan across every problem on Codemia.
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.