🔥딱 8일간! 인프런x토스x허먼밀러 역대급 혜택

블로그

일프로 미션2 Probe

▶ 응용1 : startupProbe가 실패 되도록 설정해서 Pod가 무한 재기동 상태가 되도록 설정해 보세요.startupProbe의 failureThreshold를 '1'로 설정하면 "/startup"이 가동전 호출로 실패라 인지하고Pod를 재가동하게 됩니다.startupProbe: httpGet: path: "/startup" port: 8080 periodSeconds: 5 failureThreshold: 1재가동 스샷 ▶ 응용2 : 일시적 장애 상황(App 내부 부하 증가)가 시작 된 후, 30초 뒤에 트래픽이 중단되고, 3분 뒤에는 App이 재기동 되도록 설정해 보세요.startupProbe 는 정상적인 설정으로 변경startupProbe: httpGet: path: "/startup" port: 8080 periodSeconds: 5 failureThreshold: 30readinessProbe 실패시 서비스 재연결을 함readinessProbe: httpGet: path: "/readiness" port: 8080 periodSeconds: 10 failureThreshold: 3 # 30slivenessProbe 실패시 Pod를 재기동함livenessProbe: httpGet: path: "/liveness" port: 8080 periodSeconds: 60 failureThreshold: 3 # 3mterminal에서 아래 명령어 실행// 부하 증가 API - (App 내부 isAppReady와 isAppLive를 False로 바꿈) curl http://192.168.56.30:31231/server-load-onPod 재시작 모습▶ 응용3 : Secret 파일(/usr/src/myapp/datasource/postgresql-info.yaml)이 존재하는지 체크하는 readinessProbe를 만들어 보세요.readinessProbe에 없는 파일로 설정하여 에러 발생readinessProbe: exec: command: ["cat", "/usr/src/myapp/datasource/postgresql-infoa.yaml"] periodSeconds: 10 failureThreshold: 3이벤트 확인

probe

채널톡 아이콘