initialDelaySeconds
: 컨테이너가 시작된 후 프로브를 처음 수행하기 전까지의 지연 시간(초).periodSeconds
: 프로브를 수행하는 간격(초).timeoutSeconds
: 프로브의 타임아웃(초).failureThreshold
: 프로브가 실패로 간주되기 전의 실패 시도 횟수.successThreshold
: 프로브가 성공으로 간주되기 전의 성공 시도 횟수 (주로 Readiness Probe에서 사용).startupProbe:
httpGet:
path: "/startup"
port: 8080
periodSeconds: 5
failureThreshold: 36
readinessProbe:
httpGet:
path: "/readiness"
port: 8080
periodSeconds: 10
failureThreshold: 3
livenessProbe:
httpGet:
path: "/liveness"
port: 8080
periodSeconds: 10
failureThreshold: 3
웹서버가 기동되기 전에는 API를 받지 못하기 때문에 StartupProbe는 계속 실패를 하다가 웹 서버가 완전히 기동되어 정상적으로 API 호출이 가능해지면 StartupProbe는 성공한다.
readinessProbe:
httpGet:
path: "/readiness"
port: 8080
periodSeconds: 10
failureThreshold: 3
StartupProbe가 성공하였으므로 readinessProbe도 활성화 된다. 활성화 되고 성공하면 외부트래픽을 파드로 연결한다 readinessProbe가 실패하면 정의된 failureThreshold 인 3회간 시도 후 연결이 되지 않으면 컨테이너가 비정상적인 것으로 판단하여 외부 트래픽을 차단한다 ( 파드로 전달되지 못하게)