Kubernetes 101 – External access into the cluster
In our last post, we looked at how Kubernetes handles the bulk of it’s networking. What we didn’t cover yet, was how to access services deployed in the Kubernetes cluster from outside the cluster. Obviously services that live in pods can be accessed directly as each pod has its own routable IP address. But what if we want something a little more dynamic? What if we used a replication controller to scale our web front end? We have the Kubernetes service, but what I would call its VIP range (Portal Net) isn’t routable on the network. There are a couple of ways to solve this problem. Let’s walk through the problem and talk about a couple of ways to solve it. I’ll demonstrate the way I chose to solve it but that doesn’t imply that there aren’t other better ways as well.
As we’ve seen, Kubernetes has a built-in load balancer which it refers to as a service. A service is group of pods that all provide the same function. Services are accessible by other pods through an IP address which is allocated out of the clusters portal net allocation. Continue reading