How to add label filters in Prometheus query?
kube_pod_info
kube_pod_info{created_by_kind="ReplicaSet",created_by_name="alertmanager-6d9f74d4c5",instance="kube-state-metrics:8080",job="kube-state-metrics",namespace=“test",pod="alertmanager-6d9f74d4c5-xlqrv"}
kube_pod_labels
kube_pod_labels{instance="kube-state-metrics:8080",job="kube-state-metrics",label_app="alertmanager",label_pod_template_hash="6d9f74d4c5",namespace=“test",pod="alertmanager-6d9f74d4c5-xlqrv”,label_source=“k8s"}
Here, I have kube state metrics info in prometheus for kube_pod_info & kube_pod_labels.
kube_pod_info{namespace="test"}
---> Filters pods by namespace test.
Here, I want to include filter based on labels as well. I have a label called "label_source=“k8s" in kube_pod_labels. How can I join kube_pod_info & kube_pod_labels to apply label filter as well?