Ravindra BagaleCourses & study guides मराठी

DevOps

Chapter 62: Kubernetes Services, Networking and Load Balancing: CNI, ClusterIP, NodePort, LoadBalancer, DNS and NetworkPolicy

A Pod IP keeps changing. A Service gives a stable name and IP and spreads traffic across pods. Run every Service type on a kind cluster yourself.

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

  1. 62.1Pod networking and CNI: how every pod gets an IP (Calico, Cilium, AWS VPC CNI)
  2. 62.2ClusterIP Services and EndpointSlices: a stable address for changing pods
  3. 62.3NodePort Services: opening a port on every node, and when not to
  4. 62.4LoadBalancer Services: MetalLB on kind and the AWS Load Balancer Controller
  5. 62.5ExternalName and headless Services: DNS-only Services and StatefulSet addresses
  6. 62.6CoreDNS: how service names resolve, ndots, and fixing DNS problems
  7. 62.7kube-proxy: how Service IPs become pod IPs with iptables and IPVS
  8. 62.8Session affinity, traffic policies and topology-aware routing
  9. 62.9NetworkPolicy lab with Calico: default deny, allow rules and DNS

The chapter recap is at the end of the last concept page.