https://artifacthub.io/packages/helm/prometheus-community/kube-prometheus-stack
# helm repo 설정
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo update
# 바로 설치 : helm install prom-stack prometheus-community/kube-prometheus-stack
# 설치 옵션 설정
helm pull prometheus-community/kube-prometheus-stack
tar xf kube-prometheus-stack-54.2.1.tgz
cd kube-prometheus-stack/
vi values.yaml
adminPassword: passwd # 초기값 변경
# 설치
helm install --create-namespace prom-stack . -n monitoring -f values.yaml
삭제 : helm delete prom-stack -n monitoring
# 접속 테스트 - 포트포워딩
kubectl port-forward --address 0.0.0.0 -n monitoring svc/prom-stack-grafana 9000:80 &
kubectl port-forward --address 0.0.0.0 -n monitoring svc/prom-stack-kube-prometheus-prometheus 9091:9090 &
# Grafana - nginx ingress 설정
https://github.com/grafana/helm-charts/blob/main/charts/grafana/README.md#example-ingress-with-path
1. grafana.ini : vi kube-prometheus-stack/charts/grafana/values.yaml
2. prometheus-stack : vi kube-prometheus-stack/values.yaml
재배포 및 접속 확인
재배포: helm upgrade prom-stack . -n monitoring -f values.yaml
접속: http://host/grafana
계정정보:
username: kubectl get secret --namespace monitoring prom-stack-grafana -o jsonpath="{.data.admin-user}" | base64 --decode ; echo
password: kubectl get secret --namespace monitoring prom-stack-grafana -o jsonpath="{.data.admin-password}" | base64 --decode ; echo
# Prometheus 연결 확인
# 대시보드 설정
작성중...
'Infra > IaC' 카테고리의 다른 글
[Streamlit] Nginx proxy_pass (0) | 2023.12.22 |
---|---|
[SSL] certbot ssl 발급 : nginx forward proxy 설정까지 (0) | 2023.11.29 |
[k8s] Nginx ingress : Bare metal clusters 설치 (1) | 2023.11.24 |
[k8s] kubeflow install : 진행중 (0) | 2023.11.19 |
[k8s] NFS Provider - Persistent Volumes 구성 (0) | 2023.11.19 |