are the endpoints in a service the pods? if i have a deployment with 3 pods and i expose it with a service, does that mean that service has 3 endpoints?
You will use the
service to access your n-pods. Services uses some sort of balancing between pods so you will get one single service with multiple pods behind it. I think services uses round-robin but I cannot remember well. Endpoints is just saying how many pods are connected or linked to your service, but you can use your service address to access all of them in a balancing way.
In other words, yes.
I believe endpoints we developed sometime after services so the api call which used to call the complete pod object only now needs to call the endpoint, uses less computation resources traffic etc, open to correction as always.