아래의 liveness-exam.yaml 파일에 self-healing 기능을 추가하시오
•
동작되는 pod내의 컨테이너에 /tmp/healthy 파일이 있는지 5초마다 확인한다.
•
pod 실행 후 10초 후 부터 검사한다.
•
성공횟수는 1번, 실패횟수는 연속 2회로 구성한다.
apiVersion: v1
kind: Pod
metadata:
name: liveness-exam
spec:
containers:
- name: busybox-container
image: busybox
args:
- /bin/sh
- -c
- touch /tmp/healthy; sleep 30; rm -rf /tmp/healthy; sleep 600
livenessProbe:
exec:
command:
- cat
- /tmp/healthy
initialDelaySeconds: 10
periodSeconds: 5
successThreshold: 1
failureThreshold: 2
YAML
복사