List pods that are servicing a service

前端 未结 1 1982
抹茶落季
抹茶落季 2021-01-25 02:31

I am trying to get the list of pods that are servicing a particular service

There are 3 pods associated with my service.

I tried to execute the below command

<
相关标签:
1条回答
  • 2021-01-25 03:10

    A service chooses the pods using the selector. Look at the selector for the service, and get the pods using that selector. For kubectl, the command looks like:

    kubectl get pods --selector <selector>
    
    0 讨论(0)
提交回复
热议问题