2
votes

I'm trying to get used to helm, and I'm having a problem while using helm upgrade. The question is, is it possible to have 0-downtime?

The things that I noticed is that helm/k8s removes the old pod before the new one is ready/live. Is it possible to say to remove the old one only when the new is up and running? it seems a very logical case, but I can't figure out how to do it.

NB: right now I'm forcing pod recreation with helm upgrade --recreate-pods notes notes/, can maybe be this?

1
Are you directly deploying Pods? If you change those to Deployments, Kubernetes will automatically manage replication and zero-downtime updates for you. - David Maze
I'm using helm, not K8s directly - EsseTi
I think you're confused about helms role. Helm is a tool to help you deploy your application to kubernetes. It doesn't replace any kubernetes functionality. Zero downtime deployments are provided by Kubernetes with use of the deployment type, rollout strategy, and liveness + readiness probes. See kubernetes.io/docs/concepts/workloads/controllers/deployment/… - Curtis Allen

1 Answers

4
votes

Your applications should have Livness and Readiness probes, thus it will shut down the old ones only when Readiness probe on the new ones passed. Also you can take a look at Deployment Strategy.

Liveness and Readiness probes is a must when architecting applications for Kubernetes, as described in this article.