전제
- k8s 클러스터 접근 가능해야 함 (kubectl 됨)
- Helm 설치돼 있어야 함 (helm 됨)
- (k3s면) kubeconfig 잡혀 있어야 함
확인부터 하자.
kubectl version --short
kubectl cluster-info
helm version
2) Helm repo 추가/업데이트
kube-prometheus-stack 쓰는 게 제일 편했음. Prometheus/Alertmanager/Grafana/각종 exporter까지 세트로 깔림.
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo add grafana https://grafana.github.io/helm-charts
helm repo update
helm repo list
helm search repo prometheus-community/kube-prometheus-stack | head
3) 네임스페이스 만들기
모니터링은 monitoring으로 통일함.
kubectl create namespace monitoring
kubectl get ns | grep monitoring
4) Prometheus만 켜고 + NodePort 30900으로 노출
cat > values-prom.yaml <<'EOF'
grafana:
enabled: false
prometheus:
service:
type: NodePort
nodePort: 30900
alertmanager:
enabled: false
EOF
5) 설치
helm install mon prometheus-community/kube-prometheus-stack \
-n monitoring -f values-prom.yaml
6) 확인
kubectl -n monitoring get pods -o wide
kubectl -n monitoring get svc | egrep -i 'prometheus|nodeport|30900'
'TIL' 카테고리의 다른 글
| SLB 에 대해서 간단 정리 (0) | 2026.02.12 |
|---|---|
| k3s 컨테이너에서 외부 DNS 확인 (0) | 2026.02.10 |
| Dashboards로 서버 상태 보는 법 정리 ( OpenSearch ) (0) | 2026.02.09 |
| 스위치 LAN 정리. 뭐더라.. (0) | 2026.02.06 |
| 클라이언트 에러 로그를 추적해보자. 어떻게? (0) | 2026.02.05 |