Skip to content

Instantly share code, notes, and snippets.

@anjanashankar9
Created April 5, 2022 04:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anjanashankar9/28c5f68a2fa1ddfb79c040e8952806ef to your computer and use it in GitHub Desktop.
Save anjanashankar9/28c5f68a2fa1ddfb79c040e8952806ef to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: Pod
metadata:
labels:
test: liveness
name: live-exec
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment