3

I'm working on moving our micro-service to kubernetes cluster using helm charts. Flow will be

  1. Deploy the app
  2. Run automated smoke test
  3. If the test passes, route traffic to a new set of pods.
  4. If the test fails, delete the new deployment.

Currently exploring Istio service mesh and header based router by traefik.

What's the best way to achieve this in Kubernetes world with helm without loosing helm history. So that in case of any issue in prod, helm rollback should work

David Maze
  • 130,717
  • 29
  • 175
  • 215
Santosh Hegde
  • 3,420
  • 10
  • 35
  • 51
  • 1
    So you are trying to run a test before you allow traffic to be forwarded to a pod, is that correct? Maybe in your case a simple postStartHook + readinessProbe would work. poststarthook runs test, and as long as readiness probe is failing, no traffic will be forwarded to a pod. When test passes, it trigers readiness probe to pass and traffic gets forwarded to a pod. Would it work for you? – Matt Oct 01 '20 at 11:19
  • Need to verify the deployment and service. In case of readiness, it runs for each pod. This will slow down autoscale in case of spike in traffic. – Santosh Hegde Oct 01 '20 at 16:33
  • How do you want to test it? And how do you want to route traffic to new pods? From what I understand right now, you want to deploy new pods and then if everythink is fine, switch traffic from old deployment to a new one (so called blue/green deployment?). And you dont want to use rolling update, is that correct? – Matt Oct 02 '20 at 09:52
  • Yes. I thought of Istio. But that's not available in my organization. So thinking of treafik. But I would like to know how others in industry dealing it? – Santosh Hegde Oct 03 '20 at 16:55
  • Check these: [blue-green-deployment-with-helm-charts (stackoverflow)](https://stackoverflow.com/questions/57863647/blue-green-deployment-with-helm-charts) and [blue-green-deployments-using-helm-charts (medium)](https://medium.com/@saraswatpuneet/blue-green-deployments-using-helm-charts-93ec479c0282) and let me know if these help you somehow. – Matt Oct 05 '20 at 13:39

0 Answers0