반응형 kubectl logs1 [CKA] 03. kubectl logs 명령어 사용 문제 01. 쿠버네티스에서 특정 Pod의 로그를 가져와 특정 패턴을 검색한 결과를 파일 /opt/error-logs에 저장한다. [precondition] 위 문제의 테스트를 위해서 먼저 error가 출력되는 pod를 생성한다.[root@k8s-master ~]# vi 1-test.yaml apiVersion: v1kind: Podmetadata: name: frontendspec: containers: - name: frontend image: alpine:latest command: ['sh', '-c', 'echo "test is started"'][root@k8s-master ~]# kubectl apply -f 1-test.yaml pod/frontend created[root@k8.. 2025. 1. 11. 이전 1 다음 반응형