- Documentation
Volcengine Managed Service for Prometheus
FAQs
How to Delete Service Discovery Configuration?
FAQs
How to Delete Service Discovery Configuration?
How to Delete Service Discovery Configuration?
Issue Description
A user configured service discovery by using PodMonitor in a VKE cluster. After checking the metrics, the user deleted the PodMonitor CR configuration.
The user found that after deleting the configuration, the job corresponding to the deleted service was still present.
Cause Analysis
When the PodMonitor CRD object was deleted, the system did not simultaneously delete the corresponding PodScrape configuration. As a result, the configuration remained in effect.
Solution
When you delete service discovery configurations, you also need to delete the corresponding Monitor and Scrape configurations. Perform the following steps:
tip
The following content uses PodMonitor as an example. To delete a ServiceMonitor, replace podmonitor with servicemonitor and vmpodscrape with vmservicescrape.
- On the left menu bar, click Cluster. In the cluster list on the right side, select the target cluster.
- Click the name of the cluster to go to the cluster configuration page.
- Click Workload > Resource Explorer on the left menu bar. Search for the podmonitor keyword in the resource list to find the object.
- Click the object name to go to the details page, select the configuration to delete, and under the Operation column, select ... > Delete to delete the PodMonitor configuration.
- Return to the Resource Explorer list, and search for vmpodscrape in the resource list.
- Click the object name to go to the details page, select the configuration to delete, and under the Operation column, select ... > Delete to delete the PodScrape configuration.
Result Validation
After the service discovery configuration is deleted, run the up query on the Explore page. If the corresponding job is no longer active, the service discovery configuration has been deleted.
Last updated: 2026.07.10 11:37:27