NIS2 network segmentation for Kubernetes clusters
Segmentation reviews for NIS2 usually stop at VLANs and firewalls. Inside a Kubernetes cluster, every pod can reach every other pod until someone writes a policy that says otherwise. This guide maps the NIS2 expectations onto a cluster.
Why clusters are a blind spot
A typical NIS2 segmentation review looks at network diagrams, VLANs and firewall rules. The Kubernetes cluster appears as one box, often a single subnet. Inside that box the default is the opposite of segmentation: pods are not isolated, so any pod can open a connection to any other pod in any namespace, and usually to the internet as well.
That gap matters more each year, because clusters now run the same workloads that used to sit in carefully separated VLANs: billing systems, integration services, data pipelines, sometimes the gateways that talk to OT.
What NIS2 expects, translated to a cluster
NIS2 Article 21 asks for appropriate and proportionate measures, and Article 21(2)(f) for evidence that they work. For the entities it covers, point 6.8 of the annex to Implementing Regulation (EU) 2024/2690 adds detail: zones based on risk, separation from third parties, separate administration and environments, and reviews at planned intervals. In a cluster that looks like this:
| Expectation | Kubernetes practice |
|---|---|
| Zones based on risk | Namespaces with default-deny policies; separate node pools or separate clusters for the most critical workloads |
| Separate administration | API server reachable only from an admin network or bastion; no SSH or dashboards exposed to workloads |
| Production apart from development and test | Separate clusters. Namespaces alone share nodes, the control plane and often credentials |
| Separation from third parties | Explicit egress rules for SaaS APIs, registries and vendor operators instead of open internet access |
| Reviews at planned intervals and after changes | Policies kept in Git and reviewed like code, plus drift detection between reviews |
| Effectiveness (Art. 21(2)(f), CIR point 7) | Tests from inside the cluster that try forbidden paths, and observed flows compared with the policy |
A baseline worth having before the audit
- Default-deny ingress and egress in every application namespace, then explicit allows. Remember to allow DNS to the cluster DNS service, or everything breaks at once.
- Restrict egress to the internet. Route it through an egress gateway or proxy and allow only the destinations each workload needs.
- Protect the control plane. Limit who can reach the API server and from where, and keep kubelet and etcd ports away from workload networks.
- Model the paths that leave the cluster. Databases on VMs, legacy services on bare metal and OT gateways are often the most sensitive destinations, and the ones NetworkPolicy does not describe on its own.
- Check that your CNI enforces policies. The API accepts NetworkPolicy objects even when the network plugin ignores them.
- Keep production in its own cluster when the workloads are in scope of NIS2. It is the easiest separation to explain to an auditor.
Gaps we see most often
- Policies that do nothing because the CNI does not implement them.
- hostNetwork and privileged DaemonSets. Pods on the host network share the node's network identity, and the Kubernetes documentation leaves NetworkPolicy behaviour for them undefined. Monitoring agents and CNI components often run this way.
- NodePort and LoadBalancer services exposed more widely than intended, sometimes with source addresses rewritten so that IP-based rules stop meaning what they seem to.
- Unrestricted egress. Default-deny ingress is common; default-deny egress is rare, yet egress is how data leaves.
- Namespaces treated as a hard boundary. They are a policy scope, not isolation of nodes, kernels or credentials.
- Traffic between the cluster and the rest of the estate left out of the segmentation design entirely.
Evidence an auditor can use
- NetworkPolicy and CNI policy manifests in Git, with history, reviews and approvals.
- Results of scheduled tests from a probe pod in each critical namespace that try forbidden destinations and record that they were blocked.
- Observed flows with workload identity (namespace, workload, process), compared with the approved policy.
- Coverage: namespaces without a default-deny policy, hostNetwork workloads, and nodes or periods without monitoring.
- Records of segmentation reviews after significant changes, such as a new cluster, a new CNI or a new external dependency.
The general checklist, not specific to Kubernetes, is in How to prove network segmentation to NIS2 auditors.
How Ironborg helps
Ironborg observes connections on each node with eBPF and attributes them to the namespace, workload and process that opened them, including traffic that leaves the cluster for VMs and bare-metal hosts. Approved flows become a network contract, drift is flagged, and contract attestation for audit evidence is planned. It is in early development; you can join early testing.
Want evidence that your segmentation works?
Ironborg maps real communication across Linux, VMs, containers and Kubernetes and turns it into a network contract. Continuous attestation for NIS2, ISO 27001 and IEC 62443 audits is on the roadmap. We are in early development and looking for design partners.
Join early testing ↗This article is general information, not legal advice. NIS2 obligations apply through national transposition laws, so check what applies to your organisation with your legal or compliance team.
