![[인프런 워밍업 클럽 4기 - DevOps] 미션 2. Probe 응용과제](https://cdn.inflearn.com/public/files/blogs/556138e4-f436-4581-9235-234b52224cfb/워밍업 4기 DevOps.png)
[인프런 워밍업 클럽 4기 - DevOps] 미션 2. Probe 응용과제
3개월 전
미션 전 사전 준비
HPA minReplica 1로 바꿔서 Pod 1개로 진행
▶ 응용1 : startupProbe가 실패 되도록 설정해서 Pod가 무한 재기동 상태가 되도록 설정해 보세요.
대시보드 > 디플로이먼트 > 편집으로 아래 구문 수정, 기존 레플리카 셋 제거
startupProbe:
httpGet:
path: "/startup"
port: 8080
periodSeconds: 5
failureThreshold: 1
▶ 응용2 : 일시적 장애 상황(App 내부 부하 증가)가 시작 된 후, 30초 뒤에 트래픽이 중단되고, 3분 뒤에는 App이 재기동 되도록 설정해 보세요.
대시보드 > 디플로이먼트 > 편집으로 아래 구문 수정, 기존 레플리카 셋 제거
readinessProbe:
httpGet:
path: "/readiness"
port: 8080
periodSeconds: 10
failureThreshold: 3
livenessProbe:
httpGet:
path: "/liveness"
port: 8080
periodSeconds: 60
failureThreshold: 3
부하가 발생한 직후에는 API 요청이 성공하였으나, 30초 후 요청이 차단된 것 확인60초 간격으로 livenessProbe 3번 실패 후 App 재시작 확인
▶ 응용3 : Secret 파일(/usr/src/myapp/datasource/postgresql-info.yaml)이 존재하는지 체크하는 readinessProbe를 만들어 보세요.
대시보드 > 디플로이먼트 > 편집으로 아래 구문 수정, 기존 레플리카 셋 제거
readinessProbe:
exec:
command: ["cat", "/usr/src/myapp/datasource/postgresql-info.yaml"]
periodSeconds: 10
failureThreshold: 3
해당 파일은 존재하므로 실패 로그 확인 불가.
댓글을 작성해보세요.