Prometheus & Grafana with kustomize in Argo CD

박기원·2022년 9월 4일
0

metric-server install

$ kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/download/v0.6.1/components.y

Edit metrics-server deployments.apps

$ kubectl edit deployments.apps -n kube-system metrics-server

# after - --secure-port=4443
- --kubelet-insecure-tls

monitoring namespace 생성

$ kubectl create ns monitoring

Prometheus & Grafana clone

git clone https://github.com/Park-Giwon/my-prometheus-grafana.git

kustomize로 Argo CD에 배포

kustomization.yaml

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

namePrefix: kustomize-

resources:
  - prometheus-cluster-role.yaml
  - prometheus-config-map.yaml
  - prometheus-deployment.yaml
  - prometheus-node-exporter.yaml
  - prometheus-svc.yaml
  - kube-state-cluster-role.yaml
  - kube-state-deployment.yaml
  - kube-state-svcaccount.yaml
  - kube-state-svc.yaml
  - grafana.yaml

monitoring ns 의 prometheus IP를 Grafana에 등록 후 모니터링

0개의 댓글