클라우드 배우기
Kubernetes(K8s) Helm + Prometheus stack(Prometheus + Grafana 설치 - Centos7 본문
Kubernetes(K8s) Helm + Prometheus stack(Prometheus + Grafana 설치 - Centos7
새싹싹이 2023. 9. 23. 20:56Helm
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 확인
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
'kubernetes' 카테고리의 다른 글
kubernetes(K8S) bash 사용 설정 - Centos7 (1) | 2023.10.08 |
---|---|
Kubernetes(K8S): POD 및 Service 구성 (0) | 2023.10.05 |
Kubernetes Pod Networking - Centos7 (0) | 2023.09.22 |
Kubernetes AutoScaling - Centos7 (0) | 2023.09.22 |
Kubernetes(K8S) Ingress - Centos7 (0) | 2023.09.18 |