kubernetes/StatefullSet&DaemonSet/nginx-rollingupdate.yml

35 lines
657 B
YAML
Raw Permalink Normal View History

2022-04-05 19:45:59 +02:00
apiVersion: apps/v1
kind: Deployment
2022-04-05 19:57:21 +02:00
metadata:
labels:
run: nginx
name: wdrozenie-nginx
2022-04-05 19:45:59 +02:00
spec:
replicas: 3
selector:
matchLabels:
run: nginx
strategy:
2022-04-05 19:57:21 +02:00
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
minReadySeconds: 5
revisionHistoryLimit: 5
template:
metadata:
labels:
run: nginx
spec:
containers:
- name: nginx
image: nginx:1.18
ports:
- containerPort: 80
readinessProbe:
initialDelaySeconds: 5
periodSeconds: 5
successThreshold: 1
httpGet:
path: /
port: 80