Kubernetes view services monitor

Viewed 761

I am new to Kubernetes. I created a service monitor, I am wondering how can I find the created service monitor. The service monitor is created successfully. enter image description here

When I use kubectl get services, I can't find the created service monitor. Can i get some help?

Thanks!

1 Answers

ServiceMonitor is a custom resource provided by the Prometheus Operator and it's name inside Kubernetes is servicemonitor. So you have to list you ServiceMonitors with:

kubectl get servicemonitors

Or you can list the specific ServiceMonitor you created with:

kubectl get servicemonitor servicemonitor-sms-config-services
Related