Docker & Kubernetes · Module 10
Kubernetes Services and Ingress
Give pods a stable address with Services, expose them with NodePort/LoadBalancer, and route HTTP by host/path with Ingress.
What you will learn
- Create ClusterIP Services, tell port from targetPort and read Endpoints
- Choose NodePort, LoadBalancer or ExternalName correctly
- Write Ingress rules with an ingress controller, hosts and paths
Lessons
- Services and ClusterIP
A Service gives a group of pods a stable virtual IP and DNS name; kube-proxy load-balances to the endpoints.
- NodePort, LoadBalancer, ExternalName
NodePort opens one port on every node, LoadBalancer asks the cloud for an external IP, ExternalName is a DNS alias to an outside service.
- Ingress and ingress controllers
Ingress routes HTTP/HTTPS from outside to many Services through one entry point by host and path; it needs an ingress controller to work.