Kubernetes Deployment Strategy

Kubernetes Rollout workflow
Rolling Update Strategy
apiVersion: v1
kind: Deployment
metadata:
name: hello-world
spec:
replicas: 3
template:
metadata:
labels:
app: hello-world
spec:
containers:
- name: hello-world
image: Nginx:alpine
ports:
- containerPort: 8080
Recreate Deployment Strategy
apiVersion: v1
kind: Deployment
metadata:
name: hello-world
spec:
replicas: 3
strategy:
type: Recreate
template:
metadata:
labels:
app: hello-world
spec:
containers:
- name: hello-world
image: Nginx:alpine
ports:
- containerPort: 8080
Blue/Green Deployment Type
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: hellow-world-02
spec:
template:
metadata:
labels:
app: hello-world-v2
version: "02"
apiVersion: v1
kind: Service
metadata:
name: hello-world
spec:
selector:
app: hello-world
version: "02"
...
Canary Deployment Strategy

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store