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
'Cloud > CKA' 카테고리의 다른 글
[CKA] PSI Bridge 시험 환경 적응하기 (0) | 2024.06.28 |
---|---|
[CKA] Mock Test - Network Policy ( Trouble shooting ) (0) | 2024.06.26 |
[CKA] Mock Test - DNS lookup (0) | 2024.06.25 |
[CKA] Mock Test - 사용자 생성 및 롤 바인딩 ( CSR , Rolebinding ) (0) | 2024.06.25 |
Mock test Study Logs (1) | 2024.06.10 |