How to find services pointing to a specific pod

12/2/2021

For troubleshooting purpose, I would like to find out if any existing service is pointing to the specific pod, or at least ReplicaSet/Deployment, that I am currently working on.

Is this possible with kubectl? If yes, how so?

-- ITChap
kubernetes

1 Answer

12/2/2021

There is no way with kubectl to find out however you can get an idea of service and pod by filtering with the label

kubectl get pod -l app.kubernetes.io/instance=example-service

kubectl get svc -l app.kubernetes.io/instance=example-service

however, you can use tools like https://www.jaegertracing.io/ for tracing

Or Kaili dashboard with istio depends on your stack

-- Harsh Manvar
Source: StackOverflow