Skip to content

Instantly share code, notes, and snippets.

@apurvadave
Created March 21, 2017 18:39
Show Gist options
  • Save apurvadave/5c9becdaa604c7a62804b140a10411a5 to your computer and use it in GitHub Desktop.
Save apurvadave/5c9becdaa604c7a62804b140a10411a5 to your computer and use it in GitHub Desktop.
#Example Liveness probe for the Sysdig Blog on "Monitoring Kubernetes"
apiVersion: v1
kind: Pod
metadata:
labels:
test: liveness
name: liveness-exec
spec:
containers:
- name: liveness
args:
- /bin/sh
- -c
- touch /tmp/healthy; sleep 30; rm -rf /tmp/healthy; sleep 600
image: gcr.io/google_containers/busybox
livenessProbe:
exec:
command:
- cat
- /tmp/healthy
initialDelaySeconds: 5
periodSeconds: 5
#source https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment