pod정의 영역에서 컨테이너의 상태를 확인하여 그 결과에 따라서
컨테이너 재시작 혹은 컨테이너의 condition을 Not Ready로 업데이트하여
해당 컨테이너로 트래픽을 보내지 않도록 하는 설정

-livenessProbe
livenessProbe에 initialDelaySeconds를 설정해 주어서
container에대해 probe를 바로 시작하는 것이 아니라
일정 시간이 지난 다음에 probe를 시작하도록
설정할수 있다.
livenessProbe의 결과가 실패라면
kubelet은 해당 컨테이너를 재실행 한다.
-readinessProbe
readinessProbe도 livenessProbe처럼
probe를 시작하는 시점을 명시해 줄 수 있고
probe의 주기를 설정해 줄수 있다.
readinessProbe가 실패하면
container의 condition이 Not Ready로 변경되고
endpoints controller가 Service endpoints를 갱신하고
해당 container는 트래픽을 받지 못하게 된다.
https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
'ops > kubernetes' 카테고리의 다른 글
| Terminating상태로 삭제되지 않는 리소스 삭제하기 (0) | 2026.02.28 |
|---|---|
| 쿠버네티스의 postStart and preStop handlers (0) | 2026.02.20 |
| 계속 Terminated 상태인 namespace 삭제하기 (0) | 2026.02.03 |
| is invalid: metadata.annotations: Too long: may not be more than 262144 bytes (0) | 2026.02.03 |
| 컨테이너 실행 유저 설정하기 (0) | 2026.01.30 |