apiVersion: apps/v1
kind: Deployment
metadata:
  name: liveness-deployment
  labels:
    app: liveness
spec:
  replicas: 3
  selector:
    matchLabels:
      app: liveness
  template:
    metadata:
      labels:
        app: liveness
    spec:
      containers:
      - name: liveness
        image: k8s.gcr.io/busybox
        args:
        - /bin/sh
        - -c
        - touch /tmp/healthy; sleep 30; rm -rf /tmp/healthy; sleep 600
        livenessProbe:
          exec:
            command:
            - cat
            - /tmp/healthy
          initialDelaySeconds: 5
          periodSeconds: 5