The anchored regex that drops everything
A keep rule written as a substring search. Prometheus anchors it, so it matches nothing and every target is dropped, with nothing logged to say why.
labels:
__meta_kubernetes_pod_name: api-server-7d9f
__meta_kubernetes_namespace: production
job: kubernetes-pods
relabel_configs:
- source_labels: [__meta_kubernetes_pod_name]
regex: api
action: keep