apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-app
  labels:
    app: my-app
spec:
  replicas: 4
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 25%
  selector:
    matchLabels:
      app: my-app
  template:
    metadata:
      labels:
        app: my-app
    spec:
      containers:
      - name: my-app
        image: javiercaparo/nodejs-image-demo:latest
        ports:
        - containerPort: 3000
        imagePullPolicy: Always
        readinessProbe:
            httpGet:
               path: /
               port: 3000
            initialDelaySeconds: 5
            periodSeconds: 5
            successThreshold: 1