openskills.info
Kubernetes Networking logoCourse Preview

Kubernetes Networking

Kubernetes networking provides pod-to-pod connectivity, service discovery, load balancing, and ingress routing within and across clusters. Every pod gets its own IP, services provide stable endpoints, and network policies control which workloads can communicate.

itCloud native tools and technologies

Recommended first:kubernetes-fundamentals

Don't Panic: Kubernetes Networking

Kubernetes networking gives moving containers a way to find and reach one another without making every application memorize an address book that expires whenever a Pod is replaced. Every Pod is a small host with its own cluster-wide IP. Containers inside one Pod share that network space and use localhost. The cluster is deliberately flat, which is pleasant right up until it becomes a security meeting.

The first useful idea is that Pod IPs are not names. Pods scale, roll out, and disappear, so an address is a poor place to build a relationship. A Service supplies the stable identity: a virtual IP and DNS name for the Pods currently selected by labels. Kubernetes tracks those current backends in EndpointSlices, while a service proxy sends the traffic along. The machinery is busy, but the instruction to an application remains blessedly dull: call the Service name.

The second idea is that the flat network is a contract, not a tiny miracle inside the API server. A network plugin, often called a CNI, provides Pod addresses, routing, and usually policy enforcement. Kubernetes describes the desired shape. The plugin must make packets obey it. That distinction matters when a policy looks excellent on paper and has not altered a single packet, which is a very expensive form of stationery.

For traffic from outside the cluster, a Gateway API configuration divides the work: GatewayClass names the infrastructure, Gateway provides listeners, and Routes describe application traffic. Ingress still handles established HTTP routing, but new features go to Gateway API. Neither object is a door by itself. A controller must be present to turn the route into a working entry point.

Then comes the correction to cheerful flatness: NetworkPolicy selects Pods and allows the ingress and egress they need. Pods are non-isolated until a policy selects them. Once selected, omitted flows are blocked in that direction. DNS is one of those flows, so a default-deny policy can make a perfectly healthy application appear to have forgotten its own name.

Read the cheatsheet when you need the map of Services, DNS, Gateway, and policy behavior. Use the practice reference to test the layers in a disposable namespace. The exercise turns the model into observable failures and successes. The links tab holds the official detail for the point where the map becomes your production route table.

Where this skill leads

Relevant careers

See how this topic contributes to broader role-level skill maps.

Sources