티스토리 뷰

cka

kubernetes [CKA] - Pod 2

타올이 2023. 6. 18. 23:52
반응형

문제 2 pod "custom-app"의 log를 모니터링하고 "file not found"메세지를 포함하는 로그라인을 추출하시오.

추줄된 결과는 /opt/REPORT/2022/custom-app-log에 기록하시오.

 

html
닫기
// 작업중인 환경 확인
kubectl config current-context

// k8s 클러스터 이동
kubectl config use-context hk8s

// 동작중인 클러스터에서 custom-app 을 확인
kubectl get pods

kubectl logs custom-app | grep 'file not found'

kubectl logs custom-app | grep 'file not found' > /opt/REPORT/2022/custom-app-log

// 확인
cat /opt/REPORT/2022/custom-app-log
반응형
반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
«   2025/04   »
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30
링크
글 보관함