본문 바로가기
IT

쿠버네티스 클러스터에 프로메테우스 설치

by ShrimpTaco 2025. 4. 10.

환경

  • macOS
  • minikube
# 사용한 minikube 리소스
❯ minikube config view
- memory: 10GB
- cpus: 4
- disk-size: 60GB

프로메테우스(Prometheus) 설치

  • 사전 작업: minikube, kubectl, helm 설치 (brew install)
  • Prometheus Community Kubernetes Helm Charts 설치
# helm repository 추가
❯ helm repo add prometheus-community https://prometheus-community.github.io/helm-charts

# helm chart 설치
❯ helm install kube-prometheus-stack kube-prometheus-stack -f override_values.yaml -n monitoring --create-namespace

# 설치 확인
❯ kubectl get all
NAME                                                            READY   STATUS    RESTARTS   AGE
pod/kube-prometheus-stack-grafana-59c85fffd7-4gckj              3/3     Running   0          8m16s
pod/kube-prometheus-stack-kube-state-metrics-65b546cbfc-4kdk9   1/1     Running   0          8m16s
pod/kube-prometheus-stack-operator-85f595d679-zxdvq             1/1     Running   0          8m16s
pod/kube-prometheus-stack-prometheus-node-exporter-k8cj8        1/1     Running   0          8m16s
pod/prometheus-kube-prometheus-stack-prometheus-0               2/2     Running   0          8m15s

NAME                                                     TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)                         AGE
service/kube-prometheus-stack-grafana                    ClusterIP   10.107.27.242    <none>        80/TCP                          8m16s
service/kube-prometheus-stack-kube-state-metrics         ClusterIP   10.111.120.154   <none>        8080/TCP                        8m16s
service/kube-prometheus-stack-operator                   ClusterIP   10.98.236.13     <none>        443/TCP                         8m16s
service/kube-prometheus-stack-prometheus                 NodePort    10.109.64.237    <none>        9090:30090/TCP,8080:31200/TCP   8m16s
service/kube-prometheus-stack-prometheus-node-exporter   ClusterIP   10.107.114.38    <none>        9100/TCP                        8m16s
service/prometheus-operated                              ClusterIP   None             <none>        9090/TCP                        8m15s

NAME                                                            DESIRED   CURRENT   READY   UP-TO-DATE   AVAILABLE   NODE SELECTOR            AGE
daemonset.apps/kube-prometheus-stack-prometheus-node-exporter   1         1         1       1            1           kubernetes.io/os=linux   8m16s

NAME                                                       READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/kube-prometheus-stack-grafana              1/1     1            1           8m16s
deployment.apps/kube-prometheus-stack-kube-state-metrics   1/1     1            1           8m16s
deployment.apps/kube-prometheus-stack-operator             1/1     1            1           8m16s

NAME                                                                  DESIRED   CURRENT   READY   AGE
replicaset.apps/kube-prometheus-stack-grafana-59c85fffd7              1         1         1       8m16s
replicaset.apps/kube-prometheus-stack-kube-state-metrics-65b546cbfc   1         1         1       8m16s
replicaset.apps/kube-prometheus-stack-operator-85f595d679             1         1         1       8m16s

NAME                                                           READY   AGE
statefulset.apps/prometheus-kube-prometheus-stack-prometheus   1/1     8m15s

참고

댓글