我正在使用 Prometheus 和 Prometheus Alertmanager 发送警报。
我已经在 GKE 上运行了 Kubernetes 状态集。我更新了 Prometheus 和 Prometheus AlertManager 的 ConfigMap,并对有状态集进行了 RollingUpdate,但是 pod 没有重新启动,而且它似乎仍在使用旧的 ConfigMap。
我使用了更新 ConfigMaps 的命令
kubectl create configmap prometheus-alertmanager-config --from-file alertmanager.yml -n mynamespace -o yaml --dry-run | kubectl replace -f -
同样,我也为 Prometheus 进行了更新。
对于 RollingUpdate,我使用了以下命令:
kubectl patch statefulset prometheus-alertmanager -p '{"spec":{"updateStrategy":{"type":"RollingUpdate"}}}' -n mynamespace
另外,当我做 rollingUpdate 它显示
statefulset.apps/prometheus-alertmanager patched (no change)
我不知道发生了什么,是否无法通过 RollingUpdate 使有状态集中的 pod 适应更新的 ConfigMap?或者我在这里遗漏了什么?