Publishing applications with Kubernetes’ NodePort feature
As we mentioned at the beginning of this chapter, in the Understanding the Kubernetes features for publishing applications cluster-wide section, every NodePort Service resource has an associated ClusterIP IP address. This IP address is used to internally load balance all the client requests (from the Kubernetes cluster, internal, and external clients). Kubernetes provides this internal load to all available Pod replicas. All replicas will have the same weight, hence they will receive the same amount of requests. The ClusterIP IP address makes the applications running within Pods accessible internally. To make them available externally, the NodePort Service type attaches the defined port on all cluster nodes using NAT. The following schema represents the route taken by a request to an application running inside a Kubernetes cluster:
Figure 11.9 – NodePort simplified communications schema...