Network Security
Segment workloads, default-deny traffic and encrypt communication in transit.
IntermediateNetwork SecurityInfrastructureCloudContainer
Where it fits in the lifecycle
- Plan
- Code
- Build
- Test
- Release
- Deploy
- Operate
- Monitor
- Deploy Policy enforcement, admission control and infrastructure security.
- Operate Runtime security, secrets rotation and configuration reconciliation.
Overview
Segmentation limits lateral movement. In clusters this means NetworkPolicy and mTLS; in cloud it means tightly scoped security groups and private subnets with controlled egress.
Why it matters
Flat networks turn a single compromised workload into estate-wide access.
How it works
- 01Default-deny both ingress and egress, then allow explicitly.
- 02Enforce mTLS between services where a mesh is in use.
- 03Route egress through controlled gateways with logging.
Common tools
CiliumIstioAWS Security GroupsKubernetesAWSAzureLinux
Implementation examples
yamlRestrict egress to a database
apiVersion: networking.k8s.io/v1kind: NetworkPolicymetadata: name: api-egressspec: podSelector: matchLabels: { app: api } policyTypes: [Egress] egress: - to: - podSelector: matchLabels: { app: postgres } ports: - port: 5432Best practices
- Default-deny egress, not just ingress.
- Log denied flows to detect misconfiguration and probing.
Common mistakes
- Forgetting DNS when introducing egress policy.