apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-nginx
  labels:
    app: my-nginx
spec:
  replicas: 4
  minReadySeconds: 1 # Default 0
  progressDeadlineSeconds: 60 # Default 600s
  revisionHistoryLimit: 5  #Default 10
  strategy:
    type: RollingUpdate # This is the default
    rollingUpdate:
      maxSurge: 1  #Default 25%
      maxUnavailable: 1  # Default 25%
  selector:
    matchLabels:
      app: my-nginx
  template:
    metadata:
      labels:
        app: my-nginx
    spec:
      containers:
      - name: my-nginx
        image: nginx:1.16.1-alpine  #nginx:1.17.8-alpine
        ports:
        - containerPort: 80
        resources:
          limits:
            memory: "128Mi" #128 MB
            cpu: "200m" #200 millicpu (.2 cpu or 20% of the cpu)
