일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- 쿠버네티스 컴포넌트
- helm
- EFS CSI Driver
- Kubernets on Jenkins
- 솔데스크
- Kubernetes
- terraform
- headless service
- github action 사용법
- SAA 합격 후기
- 로드밸런서 컨트롤러
- 메탈LB
- 딥레이서
- grafana on kubernetes
- EKS 클러스터
- livenessPorbe
- blue-green
- AWS 딥레이서
- 그라파나 대시보드
- LoadBalancer Controller
- 깃허브 액션
- Prometheus install
- 그라파나 시각화
- Solution Architecture
- Firelens
- 딥레이서 보상함수
- jenkins
- 쿠버네티스
- Aurora cluster
- kubernetes 동작 원리
Archives
mingming
EKS Prometheus & Grafana 본문
Prometheus와 Grafana를 통한 모니터링 시스템 구축하기
사전 준비 사항
helm 설치가 되어 있어야 합니다.
aws cli , kubectl, eksctl 명령어가 설치되어 있어야 합니다.
monitoring namespace를 생성해 줍니다.
목표 구성도
실습환경
instance : cloud9
instancetype: t2.micro
eks cluster : node 1 , t3.small
EKS Cluster Provisioning
eks cluster 구현
eksctl create cluster --name <cluster_name> --version 1.24 \
--region ap-northeast-2 \
--nodegroup-name linux-noded \
--nodes 1 --nodes-min 1 --nodes-max 4 \
--ssh-access --ssh-public-key <Key_name> --node-type t3.small --managed
namespace
prometheus & grafana 를 배포할 namespace를 생성
kubectl create namespace monitoring
Prometheous & Grafana 설치
helm 을 통해 설치합니다 .
helm 설치
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
helm repo add prometheus-community https://prometheus-community.github.io.helm-charts
helm repo update
values.yaml
helm install 하기 전 grafana 변수를 정의하는 values.yaml 파일을 다운받아 줍니다.
wget https://github.com/grafana/helm-charts/blob/main/charts/grafana/values.yaml
helm install
helm install prometheus prometheus-community/kube-prometheus-stack -f "values.yaml" --namespace monitoring
설치가 완료되면 다음과 같이 나옵니다.
NAME: prometheus
LAST DEPLOYED: Thu Aug 31 02:31:49 2023
NAMESPACE: monitoring
STATUS: deployed
REVISION: 1
NOTES:
kube-prometheus-stack has been installed. Check its status by running:
kubectl --namespace monitoring get pods -l "release=prometheus"
Visit https://github.com/prometheus-operator/kube-prometheus for instructions on how to create & configure Alertmanager and Prometheus instances using the Operator.
Prometheus가 정상적으로 작동중인지 확인합니다.
kubectl get pods -n monitoring
grafana 실행
grafana의 포트를 localhost 3000번 포트로 변경해줍니다
kubectl port-forward service/prometheus-grafana 3000:80 --namespace monitoring
lcoal host 3000 번 포트로 접속해 줍니다.
username : admin
password : prom-opreator
실습이 마무리 되었으면 클러스터를 삭제해 줍니다.
eksctl delete cluster --name <cluster_name> --region ap-northeast-2
'kubernetes' 카테고리의 다른 글
Vagrant로 kubernetes Cluster 구축하기 (0) | 2023.09.01 |
---|---|
Kubernetes Pod Resoure 할당하기 (0) | 2023.08.31 |
kubernetes static Pod (0) | 2023.08.30 |
kubernets Metal LB 설치하기 (0) | 2023.08.30 |
kubernetes init container (0) | 2023.08.29 |