apiVersion: apps/v1
kind: Deployment
metadata:
  name: helloworld-readiness
spec:
  replicas: 3
  selector:
    matchLabels:
      app: helloworld
  template:
    metadata:
      labels:
        app: helloworld
    spec:
      containers:
      - name: k8s-demo
        image: wardviaene/k8s-demo
        ports:
        - name: nodejs-port
          containerPort: 3000
        livenessProbe: #health check
          httpGet:
            path: /
            port: nodejs-port
          initialDelaySeconds: 15 #wait 15 seconds before doing a first check
          timeoutSeconds: 30
        readinessProbe: #Readiness check
          httpGet:
            path: /
            port: nodejs-port
          initialDelaySeconds: 15 #wait 15 seconds before doing a first check
          timeoutSeconds: 30
