콤퓨우터/필기: KodeKloud CKA 강의

84-87. Monitor Cluster Components, Managing Application Logs

파란화면 2024. 5. 17. 00:22
반응형

# Monitor Clutser Components
- Heapster (Deprecated)
- Metrics Server
- 쿠버 클러당 1개
- In-Memory monitoring solution
- Kubelet의 하위컴포넌트인 cAdvisor(Container Advisor)가 Pod에서의 퍼포먼스 메트릭을 받아다 Kubelet API에 노출함
- 설치 방법:
- Minikube의 경우, `minikube addons enable metrics-server`
- 기타 배포판의 경우, Github Repo를 클론한 뒤에 `kubectl create -f deploy/1.8+/`
- 설치가 완료되었으면 `kubectl top node`, `kubectl top pod`

In-memory 모니터링 솔루션이 아니라, 영구히 저장되는 시스템이 필요한 경우 Prometheus, Elastic Stack, Datadog, Dynatrace와 같은 서드파티 솔루션을 이용할 것

# Application 로그 보기
`kubectl logs 포드-이름 -f`을 하면, `docker logs 컨테이너아이디 -f`를 한 것처럼, 로그를 볼 수 있다
- `-f`: 로그를 stream 형태로 볼 수 있다

만약 Pod이 여러 컨테이너로 구성되어있는 경우, 해당 컨테이너의 이름까지 넣어줘야 한다
`kubectl logs 포드-이름 컨테이너-이름 -f`

반응형

'콤퓨우터 > 필기: KodeKloud CKA 강의' 카테고리의 다른 글

96-97. Commands on Docker and Kubernetes  (0) 2024.05.17
92. Rolling Updates and Rollbacks  (0) 2024.05.17
80. Configuring Scheduler Profiles  (0) 2024.05.17
74. Static Pods  (0) 2024.05.17
71. DaemonSet  (0) 2024.05.17