kubesphere 集群管理平台,prometheus数据修改问题

发布时间 2023-09-11 10:08:02作者: MhaiM

背景:kubesphere 修改完所有控制器资源会恢复回原来的配置,没法通过控制器去修改资源

1、登录ks-console 容器

 kubectl exec -it  ks-installer-7bb9b86d69-qlfvg  -n kubesphere-system  bash

#prometheus 所有组件yaml

 prometheus 更改路径:/kubesphere/installer/roles/ks-monitor/files/prometheus,里面是所有组件的yaml

#prometheus 告警规则更改路径

kubectl edit  PrometheusRule/prometheus-k8s-rules -n kubesphere-monitoring-system

#prometheus配置修改路径

kubectl edit  prometheus/k8s -n kubesphere-monitoring-system