Understanding Services and cluster DNS
In the last few chapters, we've talked about how to run applications effectively on Kubernetes using resources including Pods, Deployments, and StatefulSets. However, many applications, such as web servers, need to be able to accept network requests from outside their containers. These requests could come either from other applications or from devices accessing the public internet.
Kubernetes provides several types of resources to handle various scenarios when it comes to allowing resources outside and inside the cluster to access applications running on Pods, Deployments, and more.
These fall into two major resource types, Services and Ingress:
- Services have several subtypes – ClusterIP, NodePort, and LoadBalancer – and are generally used to provide simple access to a single application from inside or outside the cluster.
- Ingress is a more advanced resource that creates a controller that takes care of pathname...