Interview Prep/Kubernetes/Security: RBAC, ServiceAccounts & Pod Security

How do NetworkPolicy default-deny and namespace isolation work together?

IntermediateConceptSecurity: RBAC, ServiceAccounts & Pod Security
Answer

Create a policy in each namespace selecting all Pods (podSelector: {}) with policyTypes: [Ingress, Egress] and no rules, which denies everything, then add allow policies for specific flows. Allow rules combine with OR; inside a single from element, namespaceSelector plus podSelector combine with AND.

All Kubernetes questions Roadmap: Kubernetes networking, storage & scaling

More on Security: RBAC, ServiceAccounts & Pod Security