/zero

zero-downtime deployments in Kubernetes

Primary LanguageGo

Zero-Downtime deployments in Kubernetes

Repository contains code and presentation of: "Zero-Downtime deployments in Kubernetes"

Presentation

zero-downtime.pptx

Requirements

  • minikube
  • kubectl
  • helm
  • sql
  • JDK8 or higher for Java examples
  • Golang 1.8 or higher for Go examples

Demo Users Service

Start minikube:

minikube start

Install MySQL(with Helm):

helm install --set mysqlRootPassword=password --name mysql stable/mysql
kubectl get service mysql-mysql -o yaml | sed 's/type: ClusterIP/type: NodePort/g' | kubectl replace -f -

Create db:

cd mysql && ./mysql.sh create

Users Service - Java

Run Users Service in Kubernetes:

kubectl apply -f kube/java/01_users_srv.yaml

Run Users Deployment in Kubernetes:

kubectl apply -f kube/java/02_deployment.yaml

Users Service - Golang

Run Users Service in Kubernetes:

kubectl apply -f kube/golang/01_users_srv.yaml

Run Users Deployment in Kubernetes:

kubectl apply -f kube/golang/02_deployment.yaml

Verification:

Open:

Improvements:

  • Add example with Canary deployment
  • Add some difference (new field) between App V1 and App V2
  • [Presentation] Use better diagram to introduce Kubernetes
  • Add code snippet with HealthController
  • Create new version of presentation fo Golang