k8s-samples/CKA_Course/pods/health/liveness.yaml

15 lines
383 B
YAML
Raw Permalink Normal View History

2022-08-17 02:59:58 +00:00
apiVersion: v1
kind: Pod
metadata:
name: liveness-pod
spec:
containers:
- name: busybox
image: busybox
command: ["sh", "-c", "while true; do sleep 3600; done"]
livenessProbe:
exec:
command: ["echo", "Hello, World!"]
initialDelaySeconds: 5 # start probing 5s after container start
periodSeconds: 5 # probe every 5 seconds