Reputation: 8576
I have a proxy service that wraps 3 pods (say pod A, pod B, pod C). Some container inside pod A needs to get virtual IPs of other two pods. How can I do this?
Upvotes: 3
Views: 1888
Reputation: 13377
Two options:
kubectl get endpoints SVCNAME
or by GETing the /api/v1/namespaces/{namespace}/endpoints/{svcname}
path on the apiserver)The IPs returned in either case are the IP addresses of all the pods backing the service.
Upvotes: 4