OpenShift Container Storage is now OpenShift Data Foundation starting with version 4.9.
3.4.2. 从 OpenShift Data Foundation 中删除监控堆栈
使用本节清理 OpenShift Data Foundation 的监控堆栈。
在配置监控堆栈时创建的 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 Data Foundation 存储类的所有
config
部分,如下例所示并保存。Expand 编辑前
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 编辑后
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 在本例中,
alertmanagerMain
和prometheusK8s
监控组件使用 OpenShift Data Foundation PVC。列出使用 PVC 的 pod。
在本例中,消耗 PVC 的
alertmanagerMain
和prometheusK8s
pod 处于Terminating
状态。这些 pod 不再使用 OpenShift Data Foundation PVC后,您可以删除 PVC。Copy to Clipboard Copied! Toggle word wrap Toggle overflow 删除相关的 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