1. Move to default-deny
The highest-impact change. A new cluster runsdefaultMode: allow, so every flow no policy matches passes. Hardening means flipping that backstop to deny, in stages.
Start by denying cross-namespace traffic in audit, so you can see what would break before it does:
enforcement: enforce. When you’re ready for full zero-trust, move to defaultMode: deny — now even intra-namespace traffic needs an explicit allow.
See Enforcement Modes for the staging detail and NyxClusterConfig for the fields.
2. Lock down egress
Cross-namespace deny handles east-west traffic; egress hardening governs what leaves the cluster. The pattern is default-deny egress, then allowlist only what’s needed — by FQDN (toFqdn.matchName, which applies to HTTPS on 443) and by IP range (toIpBlock).
This policy lets the payments workload reach its provider over HTTPS and denies everything else:
3. Set platform guardrails
Some rules shouldn’t be overridable by any namespace or application team — blocking known-bad destinations, denying public-internet egress for regulated namespaces, and the like. Put these in aNyxClusterNetworkPolicy in the platform-override band (priority 0–99). Because lower priorities are evaluated first, they win over every namespace and workload policy.
This denies all public-internet egress from production, cluster-wide:
4. Control who can author policy
Hardening the network is only half the picture — control who can change it.- On Scout, policy authorship is tied to your kubectl identity through the binding step: the admission webhook only accepts policies from a recognised identity.
- On Sentinel and Aegis, SSO and RBAC give you team-based control over who can create or modify policies, with every change attributed in the audit log.
5. Exclude only what you must
excludedNamespaces in NyxClusterConfig makes a namespace bypass all enforcement, in both directions. Keep the list minimal — typically just the system namespaces that genuinely can’t tolerate policy (kube-system, kube-public, nyx-system). Every excluded namespace is a gap in enforcement. Observability still covers excluded namespaces, so you keep visibility even where you don’t enforce.