Chapter 62: Kubernetes Services, Networking and Load Balancing: CNI, ClusterIP, NodePort, LoadBalancer, DNS and NetworkPolicy
Pod cha IP sarkha badalto. Service ek sthir naav aani IP deto aani traffic saglya pods madhe vaatto. Pratyek Service prakar kind cluster var chalvun bagha.
What you will learn in this chapter
- Explain how every pod gets an IP and how CNI plugins connect pods across nodes
- Expose pods inside the cluster with ClusterIP and read EndpointSlices
- Open apps on node ports and know when not to
- Get a real external IP with MetalLB on kind and with AWS load balancers on EKS
- Use ExternalName and headless Services
- Find services by DNS name through CoreDNS
- Understand how kube-proxy load balances with iptables and IPVS
- Control stickiness and topology-aware routing
- Lock down traffic with NetworkPolicy
Concepts in this chapter
- 62.1Pod networking and CNI: how every pod gets an IP (Calico, Cilium, AWS VPC CNI)
- 62.2ClusterIP Services and EndpointSlices: a stable address for changing pods
- 62.3NodePort Services: opening a port on every node, and when not to
- 62.4LoadBalancer Services: MetalLB on kind and the AWS Load Balancer Controller
- 62.5ExternalName and headless Services: DNS-only Services and StatefulSet addresses
- 62.6CoreDNS: how service names resolve, ndots, and fixing DNS problems
- 62.7kube-proxy: how Service IPs become pod IPs with iptables and IPVS
- 62.8Session affinity, traffic policies and topology-aware routing
- 62.9NetworkPolicy lab with Calico: default deny, allow rules and DNS
The chapter recap is at the end of the last concept page.