liveBook · Manning

Network isolation

As explained in Kubernetes in Action, Second Edition

Network isolation is the restriction of network communication so that a pod can communicate only with explicitly permitted pods.

Network isolation restricts communication so that pods can connect only to explicitly permitted pods. Kubernetes does not isolate pod networks by default: a pod can communicate with pods in other namespaces unless a NetworkPolicy changes that behavior. section 7.1.4

Namespaces separate names and resources, but they do not create network or physical isolation. Pods in different namespaces may share a node and communicate across namespace boundaries. Use separate physical clusters for stronger production, staging, and development separation. section 7.1.4

Testing the default network path

A temporary client pod can reach another pod directly by IP and port, demonstrating the default pod-to-pod connectivity. Network isolation requires explicitly configuring which such connections are allowed. section 5.3.1 section 7.1.4

$ kubectl get pods -A
NAMESPACE     NAME        READY   STATUS    RESTARTS   AGE
default       kiada-ssl   2/2     Running   0          8h      #1
default       quiz        2/2     Running   0          8h
default       quote       2/2     Running   0          8h
kiada-test1   kiada-ssl   2/2     Running   0          2m     
kiada-test2   kiada-ssl   2/2     Running   0          1m     
...

Inspecting pods across namespaces makes shared cluster placement and the absence of namespace-based network isolation concrete. section 7.1.4

How Kubernetes in Action, Second Edition covers it

How deep it goes
Explains default cross-namespace reachability and NetworkPolicy’s purpose, but stops short of policy syntax and implementation.
Examples
Demonstrates direct pod access from a worker node and a temporary curl client pod.
What it assumes
Assumes familiarity with pods and namespaces while establishing that namespace separation does not imply network isolation.
What you can do after
Evaluate/understand whether namespace boundaries restrict pod connectivity and identify NetworkPolicy as the control mechanism.
How it connects
Connects namespaces, pods, NetworkPolicy, cluster nodes, and physical-cluster separation.

Also explained in

Compare how 2 books explain network isolation →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Kubernetes in Action, Second Edition. The section links point to the parts of the book it draws on.