3 Connecting Pods over the network with Services
Pods are the basic building blocks of an application running in Kubernetes. Most applications are distributed across multiple components, and you model those in Kubernetes using a Pod for each component. For example, you may have a website Pod and an API Pod, or you may have dozens of Pods in a microservice architecture. They all need to communicate, and Kubernetes supports the standard networking protocols, TCP and UDP. Both protocols use IP addresses to route traffic, but IP addresses change when Pods are replaced, so Kubernetes provides a network address discovery mechanism with Services.
Services are flexible resources that support routing traffic between Pods, into Pods from the world outside ...
Get Learn Kubernetes in a Month of Lunches now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.