# 05-05-Prometheus 与 Grafana > 使用 `kube-prometheus-stack` 建立基础可观测能力。 ## 前置条件 - 集群已正常运行 - Helm 已安装 ## 操作步骤 1. 添加仓库并更新索引 2. 创建 `monitoring` 命名空间 3. 安装 `kube-prometheus-stack` ```bash helm repo add prometheus-community https://prometheus-community.github.io/helm-charts helm repo update kubectl create namespace monitoring helm upgrade --install monitoring prometheus-community/kube-prometheus-stack -n monitoring ``` ## 验证命令 ```bash kubectl -n monitoring get pods kubectl -n monitoring get svc ``` ## 预期 - 核心组件 Pod 处于 Running ## 下一步 - `06-02-运维小结.md`