Skip to main content

Service Networking

When a service is added, nothing is managed by Kubelet. This is updated within kube-proxy to route to the correct node.

Services have "clusterIPs", but they are not actually an IP of any interface. It's a virtual IP that kube-proxy sees and adjusts the routing accordingly.

tip

It's also the "IP/Port" combination that's important.

When a ClusterIP service is created, Kubernetes assigns a cluster IP. This range is specificed by --service-cluster-ip-range in kube-proxy (default: 10.0.0.0/24)

Rules are creaetd using 3 ways:

  • userspace: listens on a port for each service, and proxies to the pod
  • ipvs:
  • iptables