部署 Prometheus

如果要手动在 Kubernetes 中处理安装 Prometheus 的每一个细节还是挺麻烦的,在官方的Kube-Prometheus项目里提供了明确的操作步骤。不过,如果只是通过 Prometheus Operator 的 Bundle 包安装 Prometheus 则非常简单。

首先从以下地址中获取 Prometheus Operator 的源码:

$ git clone https://github.com/prometheus-operator/prometheus-operator.git

安装里面的bundle.yaml,然后就完成了:

$ kubectl apply -f bundle.yaml

卸载时,同样根据bundle.yaml删除即可:

$ kubectl delete -f bundle.yaml
Kudos to Star
总字数: 136 字  最后更新: 11/19/2023, 9:11:45 PM