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

1、登录ks-console 容器

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

#kubesphere 所有组件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

posted on 2023-09-11 10:04  MhaiM  阅读(281)  评论(0)    收藏  举报