---
apiVersion: v1
kind: Pod
metadata:
  name: pod-httpd
  labels:
    component: httpd
spec:
  containers:
    - name: cntr-httpd
      image: httpd
      ports:
        - containerPort: 80
      livenessProbe:            # this section defines the healthcheck.
        httpGet:     # there's also an 'exec' setting available.
          path: /
          port: 80
        initialDelaySeconds: 10
        failureThreshold: 3
        successThreshold: 1
        periodSeconds: 30
        timeoutSeconds: 10
      readinessProbe:            # this section defines the healthcheck.
        httpGet:     # there's also an 'exec' setting available. 
          path: /
          port: 80
        initialDelaySeconds: 10
        failureThreshold: 1
        successThreshold: 1
        periodSeconds: 5
        timeoutSeconds: 10
      command: ["/bin/bash", "-c"]
      args:
        - |
          /bin/sleep 60                        # change this to simulate malfunctions
          /usr/local/bin/httpd-foreground  