apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: location-monitor
namespace: prod-lovenote
labels:
app: realtime-location #这里需要对应k8s service里的labels,service里没有就添加
spec:
jobLabel: app
endpoints:
- port: metrics
interval: 15s
selector:
matchLabels:
app: realtime-location
namespaceSelector:
matchNames:
- prod-lovenote
2022-12-29 Prometheus自定义服务发现
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
推荐阅读更多精彩内容
- Go微服务架构实战-公粽号:堆栈future 本系列文章主要是针对云原生领域微服务架构的实战,包括网关,k8s,e...
- Go微服务架构实战-【公粽号:堆栈future】 本系列文章主要是针对云原生领域微服务架构的实战,包括网关,k8s...
- 虚拟机: VMware ESXi 操作系统:CentOS Linux release 7.5 # 固定静态IP [...
- 四层负载均衡Service 在kubernetes中,Pod是有生命周期的,如果Pod重启它的IP很有可能会发生变...