Notice
Recent Posts
Recent Comments
Link
«   2025/05   »
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
Tags
more
Archives
Today
Total
관리 메뉴

클라우드 배우기

Kubernetes(K8s) Helm + Prometheus stack(Prometheus + Grafana 설치 - Centos7 본문

kubernetes

Kubernetes(K8s) Helm + Prometheus stack(Prometheus + Grafana 설치 - Centos7

새싹싹이 2023. 9. 23. 20:56

Helm 

Kubernetes chart(Package) 관리 시스템

설치 참고 : https://helm.sh/ko/docs/intro/install/ 

설치

curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.sh

helm repo add stable https://charts.helm.sh/stable : helm 공식 리포지토리 추가

<참고>

helm search repo : 리포지토리 chart 확인
helm repo update : 리포지토리 업데이트
helm list : helm으로 설치된 chart 확인

(Prometheus stack 설치 후, list)

git 미설치 시, 하기와 같은 문구가 출력되나 설치 가능

 

Prometheus Stack

Prometheus: K8S Resource Mornitoring System(CPU, Memory 위주)
Grafana: Mornitoring System 시각화

설치

helm repo add prometheus-community https://prometheus-community.github.io/helm-charts : prometheus 리포지토리 추가

prometheus-community/kube-prometheus-stack --generate-name : rometheus-community/kube-prometheus-stack 설치

kubectl get pods,svc,deployment,secret -o wide

kubectl edit service/kube-prometheus-stack-1695370082-grafana : ClusterIP를 NodePort 변경

kubectl get secret/kube-prometheus-stack-1695370082-grafana -o jsonpath="{.data.admin-password}"|base64 --decode;echo : secret 리소스 admin-password 필드를 JSON 경로(jsonpath)를 사용하여 추출, admin password는 prom-operator로 자동 설정

kubectl edit secret/kube-prometheus-stack-1695370082-grafana : josnpath 설정 확인 및 수정 가능

하기와 같이 NodePort로 grafana 서비스 변경 확인 가능

 

인터넷창

모든 노드:32565