apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx
spec:
  replicas: 1
  selector:
    matchLabels:
      app: nginx
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - image: nginx:1.19.2
        name: nginx
        resources:
          requests:
            cpu: 5m
            memory: 10Mi
          limits:
            cpu: 10m
            memory: 20Mi
        livenessProbe:
          httpGet:
            path: /
            port: http
          failureThreshold: 1
          periodSeconds: 10
