00. 사전조건
01. 개요
Kubernetes-operator
Summary
- kube-prometheus-stack collects Kubernetes manifests, Grafana dashboards, and Prometheus rules combined with documentation and scripts to provide easy to operate end-to-end Kubernetes cluster monitoring with Prometheus using the Prometheus Operator.
- Installs the kube-prometheus stack, a collection of Kubernetes manifests, Grafana dashboards, and Prometheus rules combined with documentation and scripts to provide easy to operate end-to-end Kubernetes cluster monitoring with Prometheus using the Prometheus Operator.
Dependencies
By default this chart installs additional, dependent charts:
Guide for kube-prometheus-stack with Helm3.x
02. Namespace 생성
sansae@win10pro-worksp:$ kubectl create ns monitor-po
03. Install Chart of kube-prometheus-stack
sansae@win10pro-worksp:$ git clone https://github.com/prometheus-community/helm-charts.git sansae@win10pro-worksp:$ mv helm-charts prometheus/charts sansae@win10pro-worksp:/prometheus/charts$ vi kube-prometheus-stack/values.yaml ============================================================================= 467 volumeClaimTemplate: 468 spec: 469 storageClassName: managed-premium 470 accessModes: ["ReadWriteOnce"] 471 resources: 472 requests: 473 storage: 2Gi ------------------------------------------------------------------- 2104 volumeClaimTemplate: 2105 spec: 2106 storageClassName: managed-premium 2107 accessModes: ["ReadWriteOnce"] 2108 resources: 2109 requests: 2110 storage: 50Gi =============================================================================
04. Service Connection
04-01. Prometheus Operated
sansae@win10pro-worksp:$ kubectl get svc -n monitor-po NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE alertmanager-operated ClusterIP None <none> 9093/TCP,9094/TCP,9094/UDP 30m kube-prometheus-stack-alertmanager ClusterIP 10.0.92.245 <none> 9093/TCP 30m kube-prometheus-stack-grafana ClusterIP 10.0.240.51 <none> 80/TCP 30m kube-prometheus-stack-kube-state-metrics ClusterIP 10.0.47.252 <none> 8080/TCP 30m kube-prometheus-stack-operator ClusterIP 10.0.215.243 <none> 443/TCP 30m kube-prometheus-stack-prometheus ClusterIP 10.0.152.193 <none> 9090/TCP 30m kube-prometheus-stack-prometheus-node-exporter ClusterIP 10.0.216.169 <none> 9100/TCP 30m prometheus-operated ClusterIP None <none> 9090/TCP 30m sansae@win10pro-worksp:$ kubectl port-forward service/prometheus-operated 9090 -n monitor-po Forwarding from 127.0.0.1:9090 -> 9090 Forwarding from [::1]:9090 -> 9090
04-02. Grafana
sansae@win10pro-worksp:$ kubectl port-forward service/kube-prometheus-stack-grafana 8000:80 -n monitor-po Forwarding from 127.0.0.1:8000 -> 3000 Forwarding from [::1]:8000 -> 3000 Handling connection for 8000
- default user/password is admin/prom-operator
04-03. AlertManager
sansae@win10pro-worksp:$ kubectl port-forward service/kube-prometheus-stack-alertmanager 9093:9093 -n monitor-po Forwarding from 127.0.0.1:9093 -> 9093 Forwarding from [::1]:9093 -> 9093
https://artifacthub.io/packages/helm/prometheus-community/kube-prometheus-stack
https://kubernetes.io/ko/docs/concepts/extend-kubernetes/operator/