What is a default-deny NetworkPolicy baseline?
BeginnerProductionSecurity Hardening & Compliance
Answer
Each application namespace starts with deny-all ingress and egress, plus explicit allows: DNS to CoreDNS, ingress from the ingress controller namespace, and specific service-to-service flows. It limits lateral movement after a compromise and documents the real dependency graph.
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata: { name: default-deny }
spec:
podSelector: {}
policyTypes: [Ingress, Egress]
More on Security Hardening & Compliance
What is the baseline security checklist for a production cluster?BeginnerWhy should containers run as non-root?BeginnerHow should human access to the cluster be managed?BeginnerWhat is the purpose of image scanning in CI and in the cluster?BeginnerWhy not store secrets in Git or in ConfigMaps?BeginnerWhy should nodes be treated as immutable?Beginner