Cloud/CKA
[CKA] Mock Test - Trouble shooting ( Init:CrashLoopBackOff )
westwith
2024. 6. 26. 00:17
728x90
docs : https://kubernetes.io/docs/tasks/debug/debug-application/debug-init-containers/
Debug Init Containers
This page shows how to investigate problems related to the execution of Init Containers. The example command lines below refer to the Pod as <pod-name> and the Init Containers as <init-container-1> and <init-container-2>. Before you begin You need to have
kubernetes.io
k logs orange init-myservice
#sh: sleeeep: not found
#=> k describe pod orange에서 init containers의 Command를 확인해보면
#Command:
# sh
# -c
# sleeep 2;
#라고 되어 있음 명령어 오류
#오류 수정
k edit pod orange
#위의 잘못된 명령어를 수정
#주의사항! : 종료저장(:q!)
#기존 포드 삭제 후 다시 생성
k replace --force -f yaml파일경로
728x90