반응형
[문제]
작업 클러스터 : kubectl config use-context kubernetes-admin@kubernetes
- Monitor the logs of pod custom-app and: Extract log lines corresponding to error file not found Write them to /var/CKA2022/podlog.
[풀이]
# kubectl get pods custom-app
# kubectl logs custom-app | grep 'file not found' > /var/CKA2022/podlog
# cat /var/CKA2022/podlog
※ 명령어는 아래 링크 참고
https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#logs
[참고]
- 유투브 따배씨
반응형
'자격증 > CKA' 카테고리의 다른 글
[CKA] init 컨테이너를 포함한 Pod 운영 (0) | 2023.03.27 |
---|---|
[CKA] CPU 사용량이 높은 Pod 검색 (0) | 2023.03.27 |
[CKA] Deployment & Expose the Service (0) | 2023.03.26 |
[CKA] Node 정보 수집 (0) | 2023.03.26 |
[CKA] Node 관리 (0) | 2023.03.26 |