Advanced Disciplines
Network Policy and the Discipline of Isolation
Isolation is not paranoia; it is how you keep a single compromised workload from becoming a platform incident.
Text
Authored as doctrine; evaluated as operations.
Doctrine
Network policy is where the cluster learns restraint. It defines what may speak, to whom, and by which path.
Kubblai doctrine: boundaries are part of reliability. Unbounded communication is unbounded blast radius.
CNI caveats you must acknowledge
NetworkPolicy enforcement is CNI-dependent. Some CNIs enforce only certain layers; some have performance tradeoffs. You must test policy behavior in your environment, not rely on assumption.
Policy that is not enforced is theatre.
Default-deny as a governed rollout
Default-deny is powerful and disruptive. Roll it out by namespace class, with clear exceptions and visibility into dropped traffic.
Operators who flip default-deny without observability are manufacturing incidents.
Example: baseline policy
A minimal pattern: allow within namespace, allow DNS, deny everything else by default (adjust to your needs).
NetworkPolicy baseline
yaml
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: baseline
spec:
podSelector: {}
policyTypes: ["Ingress", "Egress"]
ingress:
- from:
- podSelector: {}
egress:
- to:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: kube-system
podSelector:
matchLabels:
k8s-app: kube-dns
ports:
- protocol: UDP
port: 53
- protocol: TCP
port: 53Operational practice
Policy rollout requires a measurement loop: dropped traffic visibility, application error budgets, and staged enforcement.
Treat policy like a release: canary, validate, expand.
Canonical Link
Canonical URL: /library/network-policy-and-the-discipline-of-isolation
Related Readings
Advanced Disciplines
LibraryIngress, Egress, and the Borders of the Mesh
Ingress is not a convenience; it is the public boundary of your system. Egress is the boundary you forget until it becomes the breach.
Sacred Systems
LibraryCNI as the Nervous System of the Cluster
Your CNI is not plumbing. It is a distributed system with its own control plane, performance ceiling, and failure modes.
Governance & Power
LibraryNamespaces, Boundaries, and the Shape of Order
Namespaces are not security by themselves. They are the primary unit of operational containment and governance.