We usually use regex to get to the pods. You can use it like so kube_pod_info{pod=~"go-svc.*"}
In the above case, go-svc is the deployment name. Punit Agrawal Site Reliability Engineer, Lead New Product Development From: <kubernetes-users@googlegroups.com> on behalf of Nate Rook <n...@askspoke.com> Reply-To: "kubernetes-users@googlegroups.com" <kubernetes-users@googlegroups.com> Date: Friday, August 10, 2018 at 1:16 PM To: Kubernetes user discussion and Q&A <kubernetes-users@googlegroups.com> Subject: Re: [kubernetes-users] kube-state-metrics: How can I get a deployment's pods? Ah, sorry, this is on me. I am specifically concerned with this problem in data which is shipped to the monitoring software Prometheus. I should have been clearer about kube-state-metrics's remit. kubediscovery looks quite interesting! On Friday, August 10, 2018 at 12:09:10 PM UTC-7, devd...@cloudark.io wrote: Hi Nate, We have been working on a tool named 'kubediscovery' to help with discovering dynamic composition tree of Kubernetes Objects. You might find it useful for your use-case. You can find it here: https://github.com/cloud-ark/kubediscovery<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcloud-ark%2Fkubediscovery&data=02%7C01%7Cpunagrawal%40ebay.com%7C7b3693be98e24e6ef53008d5fefe2e97%7C46326bff992841a0baca17c16c94ea99%7C0%7C0%7C636695290015726163&sdata=4qa24Yb5rgv2lg8js6Z13ZkSqN2jv%2B4iGkur7IYW85A%3D&reserved=0> Regards, Devdatta ________________________________ From: kubernet...@googlegroups.com<javascript:> <kubernet...@googlegroups.com<javascript:>> on behalf of Nate Rook <na...@askspoke.com<javascript:>> Sent: Friday, August 10, 2018 1:26:58 PM To: Kubernetes user discussion and Q&A Subject: [kubernetes-users] kube-state-metrics: How can I get a deployment's pods? Hi, I wanted to get from a Deployment to its running Pods using some sort of label join. Getting from Pods to ReplicaSets is easy: the metric kube_pod_owner connects Pods to their ReplicaSets if they have them. But I can't find a metric with labels which let me connect ReplicaSets to Deployments: that is, there's no kube_replicaset_owner. Has anyone had any success finding this? Nate -- You received this message because you are subscribed to the Google Groups "Kubernetes user discussion and Q&A" group. To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-use...@googlegroups.com<javascript:>. To post to this group, send email to kuberne...@googlegroups.com<javascript:>. Visit this group at https://groups.google.com/group/kubernetes-users<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fgroup%2Fkubernetes-users&data=02%7C01%7Cpunagrawal%40ebay.com%7C7b3693be98e24e6ef53008d5fefe2e97%7C46326bff992841a0baca17c16c94ea99%7C0%7C0%7C636695290015726163&sdata=DS6SMa4vePFbxT8%2FrTxDjblt9qvMBV5stI8vA9dl5L8%3D&reserved=0>. For more options, visit https://groups.google.com/d/optout<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Foptout&data=02%7C01%7Cpunagrawal%40ebay.com%7C7b3693be98e24e6ef53008d5fefe2e97%7C46326bff992841a0baca17c16c94ea99%7C0%7C0%7C636695290015882422&sdata=QoFrUAM3jPEZ9osUSLsbLX%2FQ%2FA%2F05XKDd9ZU1kVzmoc%3D&reserved=0>. -- You received this message because you are subscribed to the Google Groups "Kubernetes user discussion and Q&A" group. To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-users+unsubscr...@googlegroups.com<mailto:kubernetes-users+unsubscr...@googlegroups.com>. To post to this group, send email to kubernetes-users@googlegroups.com<mailto:kubernetes-users@googlegroups.com>. Visit this group at https://groups.google.com/group/kubernetes-users<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fgroup%2Fkubernetes-users&data=02%7C01%7Cpunagrawal%40ebay.com%7C7b3693be98e24e6ef53008d5fefe2e97%7C46326bff992841a0baca17c16c94ea99%7C0%7C0%7C636695290015882422&sdata=XRlQke3HV9zGYzUyoEgZHlJNbx1uFMB1Fei4cBTP63k%3D&reserved=0>. For more options, visit https://groups.google.com/d/optout<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Foptout&data=02%7C01%7Cpunagrawal%40ebay.com%7C7b3693be98e24e6ef53008d5fefe2e97%7C46326bff992841a0baca17c16c94ea99%7C0%7C0%7C636695290015882422&sdata=QoFrUAM3jPEZ9osUSLsbLX%2FQ%2FA%2F05XKDd9ZU1kVzmoc%3D&reserved=0>. -- You received this message because you are subscribed to the Google Groups "Kubernetes user discussion and Q&A" group. To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-users+unsubscr...@googlegroups.com. To post to this group, send email to kubernetes-users@googlegroups.com. Visit this group at https://groups.google.com/group/kubernetes-users. For more options, visit https://groups.google.com/d/optout.