OpenShift Container Storage is now OpenShift Data Foundation starting with version 4.9.
4.2. 从 OpenShift Container Storage 中删除监控堆栈
使用本节清理 OpenShift Container Storage 中的监控堆栈。
在配置监控堆栈时创建的 PVC 位于 openshift-monitoring
命名空间中。
先决条件
PVC 被配置为使用 OpenShift Container Platform 监控堆栈。
如需更多信息,请参阅 配置监控堆栈。
流程
列出当前在
openshift-monitoring
命名空间中运行的 pod 和 PVC。Copy to Clipboard Copied! Toggle word wrap Toggle overflow 编辑监控
configmap
。oc -n openshift-monitoring edit configmap cluster-monitoring-config
$ oc -n openshift-monitoring edit configmap cluster-monitoring-config
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 删除引用 OpenShift Container Storage 存储类的所有
config
部分,如下例所示并保存。编辑前
Expand Copy to Clipboard Copied! Toggle word wrap Toggle overflow 编辑后
Expand Copy to Clipboard Copied! Toggle word wrap Toggle overflow 在本例中,
alertmanagerMain
和prometheusK8s
监控组件使用 OpenShift Container Storage PVC。删除相关的 PVC。请确定删除所有消耗存储类的 PVC。
oc delete -n openshift-monitoring pvc <pvc-name> --wait=true --timeout=5m
$ oc delete -n openshift-monitoring pvc <pvc-name> --wait=true --timeout=5m
Copy to Clipboard Copied! Toggle word wrap Toggle overflow