Pod-to-service communications

Kubernetes is dynamic. Pods are created and deleted all the time. The Kubernetes service is an abstraction to define a set of pods by label selectors. We normally use the service to access pods instead of specifying a pod explicitly. When we create a service, an endpoint object will be created, which describes a set of pod IPs that the label selector in that service has selected.

In some cases, the endpoint object will not be created upon creation of the service. For example, services without selectors will not create a corresponding endpoint object. For more information, refer to the Service without selectors section in Chapter 3, Getting Started with Kubernetes.

So, how does traffic get from pod to the pod ...

