我kube-prometheus-stack
从 helm chart repo prometheus-community安装
(k8s: minikube) $ kubectl get deploy,statefulset -n monitoring
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/kube-prometheus-stack-grafana 1/1 1 1 20d
deployment.apps/kube-prometheus-stack-kube-state-metrics 1/1 1 1 20d
deployment.apps/kube-prometheus-stack-operator 1/1 1 1 20d
NAME READY AGE
statefulset.apps/alertmanager-kube-prometheus-stack-alertmanager 1/1 20d
statefulset.apps/prometheus-kube-prometheus-stack-prometheus 1/1 20d
如您所见,默认情况下,grafana 安装为Deployment
,但我想Statefulset
通过在其掌舵图中更改类型来更改类型,而不是直接kubectl edit
在集群上。
以下是kube-prometheus-stack
repo 中的目录结构:
kube-prometheus-stack vjwilson(k8s: minikube) $ ls
Chart.lock charts Chart.yaml CONTRIBUTING.md crds README.md templates values.yaml
kube-prometheus-stack (k8s: minikube) $ tree -d
.
├── charts
│ ├── grafana
│ │ ├── ci
│ │ ├── dashboards
│ │ └── templates
│ │ └── tests
│ ├── kube-state-metrics
│ │ └── templates
│ └── prometheus-node-exporter
│ ├── ci
│ └── templates
├── crds
└── templates
├── alertmanager
├── exporters
│ ├── core-dns
│ ├── kube-api-server
│ ├── kube-controller-manager
│ ├── kube-dns
│ ├── kube-etcd
│ ├── kubelet
│ ├── kube-proxy
│ └── kube-scheduler
├── grafana
│ └── dashboards-1.14
├── prometheus
│ └── rules-1.14
└── prometheus-operator
└── admission-webhooks
└── job-patch
30 directories
我很困惑,并且卡在这个掌舵上的确切位置要更改并告诉 grafana 安装为Statefulset
而不是 default Deployment
。如果有人可以提供帮助,那就太好了。