apiVersion: v1
kind: Pod
metadata:
  name: liveness-pod
spec:
  containers:
    - image: busybox
      name: app
      args:
        - /bin/sh
        - -c
        - "mkdir -p /tmp; while true; do touch /tmp/heartbeat.txt; sleep 5; done;"
      livenessProbe:
        exec:
          command:
            - /bin/sh
            - -c
            - test `find /tmp/heartbeat.txt -mmin -1`
        initialDelaySeconds: 5
        periodSeconds: 5
