클라우드 엔지니어/클라우드 캠프과정

쿠버네티스 헬름, 모니터링시스템구축 (Helm,Prometheus-Grafana)

해아's 2022. 10. 24. 11:19
Helm
  1) Helm이란?
	Helm이란, Kubernetes 패키지 관리를 도와주는 것(패키지매니저)으로, yaml 파일의 모음이라고 할 수 있다.	
	prod 환경과 개발환경과 같이 비슷하지만 이름과 리소스 사용만 조금 다른 환경을 구성할 때 변수를 사용하여 yaml 파일을 관리를 하거나
		ex) mysql-prod, mysql-dev 에서 mysql-변수
	오픈소스 프로그램을 개발하는 회사에서 본인들의 프로그램을 k8s 환경에 쉽게 배포하여 사용할 수 있게 활용하는 도구
  2) Helm 설치
	curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3
	chmod 700 get_helm.sh
	./get_helm.sh
  3) Helm 차트 사용법
    (1) 레포지토리 추가
	helm repo add bitnami https://charts.bitnami.com/bitnami
    (2) 레포지토리 확인
	helm repo list
    (3) 차트 검색
	helm search repo bitnami | grep tomcat
    (4) 레포지토리 업데리트 
	helm repo update
    (5) 레포지토리 삭제
	helm repo remove bitnami

Helm을 이용해서 모니터링 환경 구축
	kubectl create namespace monitoring
	helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
	
	helm repo update

	wget https://raw.githubusercontent.com/grafana/helm-charts/main/charts/grafana/values.yaml
	helm install prometheus prometheus-community/kube-prometheus-stack -f "values.yaml" --namespace monitoring

 

 

설치후 그라파나의 서비스를 노드포트로 변경후 접속한다

계정은 admin, 패스워드는 prom-operator 입니다.

 

  13770 ,11000 ,15337 다른분들이 만들어둔 쿠버네티스 클러스터 대쉬보드이다.

728x90
반응형