apiVersion: apps/v1
kind: Deployment
metadata:
  name: dep4
spec:
  strategy:
    # This block is new ->
    type: RollingUpdate                     # or Recreate
    rollingUpdate:
      maxSurge: 1                           # specifies the maximum number of Pods that can be created over the desired number of Pods
      maxUnavailable: 25%                   # specifies the maximum number of Pods that can be unavailable during the update process
    # -> until here
  replicas: 5
  selector:
    matchLabels:
      mykey: myvalue
  template:                                 # pod definition starts from here
    metadata:
      name: pod4
      labels:
        mykey: myvalue
    spec:
      containers:
      - name: container4
        image: sadedil/simpleinfoserver:1.0.0
        # And this block is new ->
        readinessProbe:
          httpGet:
            path: /
            port: 80
          initialDelaySeconds: 15           # Number of seconds after the container has started before readiness probes are initiated.
          periodSeconds: 5                  # How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.
          successThreshold: 1               # Minimum consecutive successes for the probe to be considered successful after having failed.
        # -> until here
        ports:
        - containerPort: 80