0

My understanding is that a Kubernetes service identifies a set of pods.

I use kubectl get pods -n <namespace> to list the pods in a namespace and this works fine.

How can I list the pods in a specific Kubernetes service? I'd like to find every pod running in a service within a namespace.

ktm5124
  • 11,861
  • 21
  • 74
  • 119
  • 1
    your service will belong to a namespace and have a label selector in it. you can use the labels in your get pods command to get pods that only match those labels – Chris Doyle Nov 25 '21 at 17:45
  • @braebdeb Thank you That does answer my question – ktm5124 Nov 25 '21 at 17:56

0 Answers0