Monitor kubernetes

Riguz留言 | 贡献2025年4月18日 (五) 15:20的版本 (创建页面,内容为“=kube-prometheus-stack = To monitor your Kubernetes cluster (including Knative functions and OpenEBS storage), here's a lightweight yet comprehensive setup using ​Prometheus, ​Grafana, and ​Alertmanager via the ​kube-prometheus-stack. This stack is optimized for single-node clusters and includes preconfigured dashboards/alerts. <syntaxhighlight lang="python"> helm repo add prometheus-community https://prometheus-community.github.io/helm-charts helm re…”)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)

kube-prometheus-stack

To monitor your Kubernetes cluster (including Knative functions and OpenEBS storage), here's a lightweight yet comprehensive setup using ​Prometheus, ​Grafana, and ​Alertmanager via the ​kube-prometheus-stack. This stack is optimized for single-node clusters and includes preconfigured dashboards/alerts.

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

config:

# monitoring-values.yaml

prometheus:
  prometheusSpec:
    storageSpec:
      volumeClaimTemplate:
        spec:
          storageClassName: openebs-hostpath
          accessModes: ["ReadWriteOnce"]
          resources:
            requests:
              storage: 5Gi
    resources:
      requests:
        memory: 512Mi
        cpu: 200m

grafana:
  adminPassword: "admin"
  persistence:
    enabled: true
    storageClassName: openebs-hostpath
    size: 5Gi

alertmanager:
  alertmanagerSpec:
    resources:
      requests:
        memory: 256Mi
        cpu: 100m

# Disable components not needed for a single-node cluster
kubeEtcd:
  enabled: false
kubeControllerManager:
  enabled: false
kubeScheduler:
  enabled: false
helm install monitoring prometheus-community/kube-prometheus-stack \
  -n monitoring --create-namespace \
  -f monitoring-values.yaml