janavenkat / talk_zero_downtime_deployment_with_kubernetes

Deployment strategies with Kubernetes and how to prepare your micro-service for them

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Zero deployment of Micro-Services with Kubernetes

Do you need to implement a zero-downtime deployment for your product? Did you consider Kubernetes? Check whether my slides, demos of different deployment strategies, and an service implementation example might help you get started. You can run all demos on minikube.

To see how to prepare your microservice, check Golang and .net core implementations (Looking for contributions in Py and Rust).

The demos cover recreate, rolling updates, blue-green, and canary deployment strategies. In future, I will add other deployment approaches - see TBD below.

Slides:

Demos:

Helpful? Please give a LIKE to the most recent LinkedIn post about this talk or a STAR to this github repo. Questions, Feedback? Let me know at wojciech.barczynski@smacc.io.

So far, I presented this material at: Pizza&Tech meetup in Wroclaw and -- the shorter version -- on Golang Warsaw Meetup and DevOps Warsaw Meetup at Ocado. Previous versions:

How to build your component

livenessProbe and readinessProbe

  • livenessProbe:

    livenessProbe:
      httpGet:
        path: /model
        port: 8000
        httpHeaders:
          - name: X-Custom-Header
            value: Awesome
      initialDelaySeconds: 600
      periodSeconds: 5
      timeoutSeconds: 18
      successThreshold: 1
      failureThreshold: 3
    
  • readinessProbe:

    readinessProbe:
      exec:
        command:
        - cat
         - /tmp/healthy
      initialDelaySeconds: 5
      periodSeconds: 5
    

Graceful shutdown

  • handling SIGTERM
  • health and ready implementation

Check demo and demo_net.

Looking for a Java implementation, check Mateusz Dyminski talk.

TBD

To Be Added before the next talk:

  1. cover: what happening is during a k8s upgrade
  2. cover: anti-affinity
  3. conver pod's disruption budget
  4. shadow deployment with (most probably) Istio
  5. feature switch with Golang
  6. A/B deployment with Golang
  7. Weight-based routing of requests with Traefik
  8. Python example.

Related Work

About

Deployment strategies with Kubernetes and how to prepare your micro-service for them


Languages

Language:JavaScript 60.1%Language:CSS 30.6%Language:HTML 8.2%Language:C# 0.9%Language:Makefile 0.2%Language:Dockerfile 0.0%