brunch

매거진 kakao cloud

You can make anything
by writing

C.S.Lewis

by Master Seo Feb 11. 2024

카카오 클라우드 4탄-10. 쿠베네티스 모니터링

쿠버네티스 모니터링을 해보자.


<0> 사전 준비 - helm install 

<1> slack 연동

<2> 모니터링 환경 구축

<3> Slack Alert 수신확인

<4> 그라파나 대시 보드 확인

<5> 참고 사이트



<0> 사전 준비 - helm install 



1

centos 8

https://helm.sh/docs/intro/install/

wget https://get.helm.sh/helm-v3.14.0-linux-386.tar.gz

chmod 755 helm-v3.14.0-linux-386.tar.gz


 tar zxvf helm-v3.14.0-linux-386.tar.gz

mv linux-386/helm /usr/bin/helm



[root@host-10-0-3-182 ~]# helm version

WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /root/.kube/config

WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /root/.kube/config

version.BuildInfo{Version:"v3.14.0", GitCommit:"3fc9f4b2638e76f26739cd77c7017139be81d0ea", GitTreeState:"clean", GoVersion:"go1.21.5"}





<1> slack 연동



1

https://api.slack.com/apps



2

https://hooks.slack.com/services/T0569T





<2> 모니터링 환경 구축


helm repo add prometheus-community https://prometheus-community.github.io/helm-charts


helm repo update


helm install prometheus prometheus-community/kube-prometheus-stack -f custom-values.yaml -n kube-system


Error: INSTALLATION FAILED: Kubernetes cluster unreachable: Get "https://948206e2-9802-494f-bdb6-3bf523cfc160-public.ke.kr-central-2.kakaocloud.com/version": getting credentials: exec: executable kic-iam-auth failed with exit code 1



[root@host-10-0-3-182 k8se-monitor]#




<3> Slack Alert 수신확인




<4> 그라파나 대시 보드 확인


1

kubectl port-forward svc/prometheus-grafana -n kube-system 30080:80 &

admin

prom-operator



2

Grafana 데이터 소스 생성하기



3

Grafana 대시보드 확인하기

curl -O https://raw.githubusercontent.com/kakaoenterprise/kc-handson-config/k8s-monitor/dashboard.json





<5> 참고 사이트


https://docs.kakaocloud.com/tutorial/kubernetes/k8se-cluster-monitoring





https://brunch.co.kr/@topasvga/3651



감사합니다.

매거진의 이전글 카카오 클라우드 4탄-9. 트랜짓 게이트웨이
작품 선택
키워드 선택 0 / 3 0
댓글여부
afliean
브런치는 최신 브라우저에 최적화 되어있습니다. IE chrome safari