Creating a service

At this point, we have defined a pod for our application and deployed multiple replicas of our application using a deployment resource, and we now need to ensure external clients can connect to our application. Given that we have multiple replicas of our application running, we require a component that is able to provide a stable service endpoint, track the location of each replica, and load balance incoming connections across all replicas.

Services are the Kubernetes resources that provide such features, where each service is assigned a virtual IP address that can be used to access a given set of pods, and incoming connections to the virtual IP address are load balanced to each pod replica, based upon iptables rules that ...

Get Docker on Amazon Web Services 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.