만들기/EagleEye

[EagleEye][환경세팅] Kubernetes Prometheus-stack 설치

pythaac 2022. 5. 17. 00:00

https://ekwkqk12.tistory.com/48

 

[Monitoring] Prometheus-Stack

Helm helm repo add prometheus-community https://prometheus-community.github.io/helm-charts helm repo update helm pull prometheus-community/kube-prometheus-stack --untar ktl create ns proemtheus-stac..

ekwkqk12.tistory.com

https://jerryljh.tistory.com/9

 

15. Kube 교육 - Prometheus Stack 설치

실습 prometheus-stack 설치 grafana 기본 모니터링 페이지 확인 Why Prometheus? Kube 환경에서는 Prometheus가 모니터링 표준 입니다. (이미 2018년 CNCF Graduated, Kubernetes 이 후 2번째 CNCF 졸업 Project..

jerryljh.tistory.com

 

  • helm chart 다운
    >> helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
    >> helm repo update
    >> helm pull prometheus-community/kube-prometheus-stack --untar
  • namespace 생성
    >> kubectl create ns prometheus
  • values.yaml 수정
    >> cd kube-prometheus-stack
    >> vi values.yaml
...
alertmanager:
  ...
  service:
    ...
    nodePort: 32002
    type: NodePort
...
##########################
prometheus:
  ...
  service:
  ...
  nodePort: 32001
  type: NodePort
  ...
  retentionSize: "2GB"   ## raspberry pi의 작은 용량을 감안 + 테스트용
  ...
##########################
prometheusOperator:
  tls:
    enabled: false
  admissionwebhooks:
    enabled: false
  • grafana values.yaml 수정
    >> vi charts/grafana/values.yaml
...
service:
  nodePort: 32003
  type: NodePort
...

 

  • 배포
    >> helm install prometheus -f values.yaml ./ -n prometheus
    (install에서 cannot re-use ~~ 에러시 uninstall -> install 또는 upgrade 사용)
    >> (upgrade) helm upgrade --install prometheus -f values.yaml ./ -n prometheus
    >> (uninstall) helm uninstall prometheus -n prometheus
    (시간이 좀 걸림)

  • 동작 확인
    >> kubectl get all -n prometheus

 

  • Grafana 확인
    >> http://{아이피}:32003
    - ID : admin
    - PW : prom-operator

  • alertmanager 확인
    >> http://{아이피}:32002

  • Prometheus 확인
    >> http://{아이피}:32001

 

 

 

https://github.com/prometheus-community/helm-charts/issues/418

 

[kube-prometheus-stack] prometheusOperator.admissionWebhooks.enabled=false fails · Issue #418 · prometheus-community/helm-char

Describe the bug helm install prom prometheus-community/kube-prometheus-stack \ --set prometheusOperator.admissionWebhooks.enabled=false results in pod/prom-kube-prometheus-stack-operator-869f7cfd6...

github.com