Skip to content

Instantly share code, notes, and snippets.

View luandevpro's full-sized avatar

Luận Trần luandevpro

View GitHub Profile
kubectl apply -f service-blue-green.yaml
apiVersion: v1
kind: Service
metadata:
name: entry-point
spec:
ports:
- port: 80
targetPort: 8080
type: NodePort
selector:
kubectl apply -f deployment-blue.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: blue
spec:
minReadySeconds: 10
replicas: 3
selector:
matchLabels:
kubectl get pods --show-labels
kubectl apply -f deployment-canary.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: canary
spec:
minReadySeconds: 10
replicas: 1
selector:
matchLabels:
kubectl apply -f service.yaml
apiVersion: v1
kind: Service
metadata:
name: entry-point
spec:
ports:
- port: 80
targetPort: 8080
type: NodePort
selector:
kubectl apply -f deployment-prod.yaml