Lesson 11 — Network Security Best Practices
Learning Objectives
Section titled “Learning Objectives”By the end of this lesson, you will be able to:
- Apply enterprise Kubernetes networking best practices
- Design secure Amazon EKS networking architectures
- Implement Zero Trust networking
- Secure ingress, egress and east-west traffic
- Understand enterprise governance and compliance
- Monitor Kubernetes networking effectively
- Identify common networking mistakes
- Build production-ready Kubernetes networking environments
Why This Matters
Section titled “Why This Matters”Enterprise networking is far more than connecting applications together.
A secure Kubernetes network should:
- Protect workloads
- Prevent lateral movement
- Restrict unnecessary communication
- Detect attacks quickly
- Support compliance requirements
- Remain highly available
- Scale with business growth
Cloud Security Engineers are responsible for ensuring that networking is secure by design, not secured after deployment.
Good network architecture significantly reduces the likelihood and impact of security incidents.
Enterprise Network Security Principles
Section titled “Enterprise Network Security Principles”Enterprise Kubernetes networking should always follow these principles:
- Least Privilege
- Zero Trust
- Defense in Depth
- Identity-Based Access
- Micro-Segmentation
- Continuous Monitoring
- Automation
- High Availability
- Secure by Default
Every networking decision should align with these principles.
Defense in Depth
Section titled “Defense in Depth”No single security control should be relied upon.
Instead, multiple security layers work together.
Internet
↓
AWS Shield
↓
AWS WAF
↓
Application Load Balancer
↓
Ingress Controller
↓
Network Policies
↓
Service Mesh
↓
Mutual TLS
↓
RBAC
↓
IAM
↓
ApplicationIf one control fails, others continue protecting the environment.
Secure Network Architecture
Section titled “Secure Network Architecture”A production-ready Amazon EKS architecture should include:
Internet
↓
CloudFront
↓
AWS WAF
↓
Application Load Balancer
↓
Ingress Controller
↓
Private Subnets
↓
Amazon EKS
↓
Service Mesh
↓
Applications
↓
Amazon RDSEvery component contributes to the overall security posture.
Principle of Least Privilege
Section titled “Principle of Least Privilege”Applications should only communicate with services they require.
Example:
Frontend
↓
API
✓ Allowed
-----------------------
Frontend
↓
Database
✗ DeniedNever allow unnecessary communication.
Network Segmentation
Section titled “Network Segmentation”Segment applications into logical security boundaries.
Examples:
- Production
- Development
- Testing
- Shared Services
- Security
Example:
Production Namespace
↓
Production Database
✓
--------------------
Development Namespace
↓
Production Database
✗Segmentation limits the blast radius of security incidents.
Zero Trust Networking
Section titled “Zero Trust Networking”Assume no communication is trusted automatically.
Every request should be:
Authenticate
↓
Authorise
↓
Encrypt
↓
Evaluate Policy
↓
AllowZero Trust applies equally to:
- Users
- Pods
- Services
- APIs
- Nodes
Secure Ingress
Section titled “Secure Ingress”External traffic should always pass through multiple security controls.
Internet
↓
AWS Shield
↓
AWS WAF
↓
Application Load Balancer
↓
Ingress Controller
↓
ApplicationNever expose applications directly using public NodePorts or unnecessary public LoadBalancer Services.
Secure East-West Traffic
Section titled “Secure East-West Traffic”Internal communication should always be protected.
Use:
- Network Policies
- Service Mesh
- Mutual TLS
- Authorization Policies
Example:
Application
↓
mTLS
↓
API
↓
mTLS
↓
DatabaseAll communication should be encrypted and authenticated.
Secure Egress
Section titled “Secure Egress”Restrict outbound traffic.
Recommended architecture:
Pod
↓
Network Policy
↓
Private Subnet
↓
NAT Gateway
↓
AWS Network Firewall
↓
InternetOnly approved destinations should be reachable.
Secure DNS
Section titled “Secure DNS”DNS should never be treated as a simple networking service.
Protect DNS using:
- CoreDNS
- Route 53 Resolver
- DNS Firewall
- Query Logging
- DNS Monitoring
Example:
Application
↓
CoreDNS
↓
DNS Firewall
↓
Approved DomainsDNS telemetry is often the first indicator of malware activity.
Service Mesh Best Practices
Section titled “Service Mesh Best Practices”When using Istio or Linkerd:
- Enable automatic sidecar injection
- Enable Mutual TLS
- Rotate certificates automatically
- Apply Authorization Policies
- Monitor service identities
- Enable distributed tracing
Never allow plaintext service communication in production.
Network Policies Best Practices
Section titled “Network Policies Best Practices”Every production Namespace should have:
- Default Deny Ingress
- Default Deny Egress
- Explicit Allow Rules
Example:
Default
↓
Deny Everything
↓
Allow Only Required TrafficThis follows the principle of least privilege.
Secure Amazon EKS Networking
Section titled “Secure Amazon EKS Networking”Recommended production design:
- Private worker nodes
- Private subnets
- Multiple Availability Zones
- VPC Endpoints
- AWS Load Balancer Controller
- Security Groups
- Network ACLs
- Transit Gateway
- AWS Organizations
Avoid assigning public IP addresses to application workloads unless absolutely necessary.
Identity-Based Networking
Section titled “Identity-Based Networking”Identity should always be preferred over IP addresses.
Use:
- IAM Identity Center
- RBAC
- IAM Roles for Service Accounts (IRSA)
- Mutual TLS identities
- Kubernetes Service Accounts
Identity-based networking supports Zero Trust principles and reduces reliance on changing infrastructure details.
Enterprise Monitoring
Section titled “Enterprise Monitoring”Monitor networking continuously.
Key telemetry includes:
- VPC Flow Logs
- CloudTrail
- CloudWatch
- GuardDuty
- Security Hub
- Network Firewall logs
- CoreDNS logs
- Route 53 DNS logs
- Service Mesh telemetry
- Kubernetes audit logs
Monitoring enables rapid detection of abnormal behaviour.
Enterprise Incident Response
Section titled “Enterprise Incident Response”When suspicious networking activity is detected:
Alert
↓
Investigate
↓
Isolate Workload
↓
Collect Evidence
↓
Contain Threat
↓
Recover Services
↓
Lessons LearnedPrepared incident response procedures reduce downtime and improve recovery.
Enterprise Governance
Section titled “Enterprise Governance”Networking should be governed through policy rather than manual processes.
Common governance controls include:
- AWS Organizations
- Service Control Policies (SCPs)
- IAM Policies
- RBAC
- Kyverno
- OPA Gatekeeper
- Infrastructure as Code
- Change Management
- Continuous Compliance
Governance ensures consistency across all environments.
Common Networking Mistakes
Section titled “Common Networking Mistakes”Cloud Security Engineers frequently identify:
- Flat Kubernetes networking
- Missing Network Policies
- Public worker nodes
- Public databases
- Overly permissive Security Groups
- Missing Mutual TLS
- Unrestricted outbound Internet access
- Shared IAM roles
- Lack of DNS monitoring
- Poor CIDR planning
- Missing VPC Flow Logs
- Weak logging and alerting
- No disaster recovery testing
These weaknesses increase both operational and security risk.
Enterprise Security Checklist
Section titled “Enterprise Security Checklist”Before production deployment, verify that:
| Security Control | Status |
|---|---|
| Private Worker Nodes | ✅ |
| Multi-AZ Deployment | ✅ |
| Network Policies Enabled | ✅ |
| Default Deny Policies | ✅ |
| Service Mesh Implemented | ✅ |
| Mutual TLS Enabled | ✅ |
| RBAC Configured | ✅ |
| IRSA Configured | ✅ |
| VPC Endpoints Used | ✅ |
| AWS WAF Enabled | ✅ |
| AWS Shield Enabled | ✅ |
| DNS Firewall Enabled | ✅ |
| AWS Network Firewall Enabled | ✅ |
| Logging Enabled | ✅ |
| Monitoring Enabled | ✅ |
| Incident Response Plan Tested | ✅ |
This checklist provides a strong baseline for production readiness.
Enterprise Example
Section titled “Enterprise Example”A global pharmaceutical company operates critical research applications on Amazon EKS.
Its networking architecture includes:
CloudFront
↓
AWS Shield Advanced
↓
AWS WAF
↓
Application Load Balancer
↓
Ingress Controller
↓
Amazon EKS
↓
Istio Service Mesh
↓
Mutual TLS
↓
Research Applications
↓
Amazon Aurora
↓
Amazon S3Supporting security services include:
- AWS Organizations
- Transit Gateway
- Route 53 Resolver DNS Firewall
- AWS Network Firewall
- GuardDuty
- Security Hub
- CloudWatch
- VPC Flow Logs
- Centralized SIEM
The environment follows Zero Trust principles and satisfies strict pharmaceutical regulatory requirements while supporting global collaboration.
Enterprise Network Security Framework
Section titled “Enterprise Network Security Framework”A recommended implementation roadmap:
Step 1
↓
Design Secure Network
↓
Step 2
↓
Deploy Private Infrastructure
↓
Step 3
↓
Implement Network Policies
↓
Step 4
↓
Deploy Service Mesh
↓
Step 5
↓
Enable Mutual TLS
↓
Step 6
↓
Secure DNS
↓
Step 7
↓
Restrict Egress
↓
Step 8
↓
Enable Monitoring
↓
Step 9
↓
Test Incident Response
↓
Step 10
↓
Continuous ImprovementEnterprise security is a continuous process rather than a one-time deployment.
Best Practices
Section titled “Best Practices”As a Kubernetes Security Engineer:
- Design networking with Zero Trust principles from the beginning.
- Deploy workloads in private subnets.
- Enable default deny ingress and egress policies.
- Encrypt all service-to-service communication using Mutual TLS.
- Implement Network Policies for every production Namespace.
- Protect external applications with AWS WAF and AWS Shield.
- Use VPC Endpoints for AWS service access.
- Continuously monitor VPC Flow Logs, DNS activity and Service Mesh telemetry.
- Enforce governance through Infrastructure as Code and policy engines.
- Regularly review firewall rules, routing tables and Security Groups.
- Test disaster recovery, failover and incident response processes.
- Conduct periodic architecture reviews and penetration testing.
Enterprise networking should be secure, observable, resilient and continuously improved.
Real-World Scenario
Section titled “Real-World Scenario”A global e-commerce company hosts over 800 microservices across multiple Amazon EKS clusters in five AWS Regions.
Its network security strategy includes:
- AWS Organizations with dedicated Production, Security and Shared Services accounts
- Multi-AZ private Amazon EKS clusters
- AWS Transit Gateway for centralized connectivity
- AWS WAF and AWS Shield Advanced protecting all public applications
- Istio Service Mesh enforcing Mutual TLS
- Kubernetes Network Policies implementing micro-segmentation
- Route 53 Resolver DNS Firewall protecting DNS resolution
- AWS Network Firewall inspecting outbound traffic
- GuardDuty, Security Hub and CloudWatch providing centralized monitoring
- Automated compliance checks using Kyverno and Infrastructure as Code
During a penetration test, security engineers simulate a compromised application.
Although the attacker gains access to one Pod, they cannot:
- Reach sensitive databases
- Access Kubernetes Secrets
- Contact malicious external servers
- Move laterally to other workloads
- Escalate privileges
Layered security controls immediately detect the activity, isolate the affected workload and generate alerts for the Security Operations Centre (SOC).
The incident demonstrates how enterprise network security best practices significantly reduce the impact of real-world attacks.
Key Takeaways
Section titled “Key Takeaways”After completing this lesson, you should understand:
- Enterprise Kubernetes networking principles
- Defense in Depth
- Zero Trust networking
- Network segmentation
- Secure ingress, egress and east-west traffic
- Service Mesh and Mutual TLS best practices
- Secure DNS architectures
- Enterprise monitoring and governance
- Common networking mistakes
- Production-ready security recommendations
Enterprise Kubernetes network security is built on multiple complementary controls rather than a single technology. By combining Zero Trust networking, identity-based access, Network Policies, Service Mesh, secure AWS networking services, continuous monitoring and strong governance, organizations can build highly resilient Amazon EKS environments capable of defending against modern cloud-native threats.
Knowledge Check
Section titled “Knowledge Check”Question 1
Section titled “Question 1”Which security model assumes that no user, workload or network should be trusted by default?
- A. Flat Network
- B. Zero Trust
- C. Perimeter Security
- D. Shared Responsibility Model
Answer: B
Question 2
Section titled “Question 2”Which Kubernetes feature is primarily used to restrict Pod-to-Pod communication?
- A. ReplicaSets
- B. Network Policies
- C. Persistent Volumes
- D. StatefulSets
Answer: B
Question 3
Section titled “Question 3”Which AWS service helps inspect outbound network traffic from Amazon EKS workloads?
- A. Amazon Route 53
- B. AWS Network Firewall
- C. AWS Lambda
- D. Amazon ECR
Answer: B
Question 4
Section titled “Question 4”Which technology provides encrypted and authenticated service-to-service communication within a Service Mesh?
- A. kube-proxy
- B. Mutual TLS (mTLS)
- C. CoreDNS
- D. Amazon CloudFront
Answer: B
Question 5
Section titled “Question 5”Which combination best represents enterprise Kubernetes network security?
- A. Public worker nodes, unrestricted communication and shared IAM roles
- B. Zero Trust networking, Network Policies, Service Mesh, Mutual TLS, centralized monitoring and governance
- C. Single Availability Zone with public databases
- D. Flat networking with unrestricted Internet access
Answer: B
Module Summary — Kubernetes Network Security
Section titled “Module Summary — Kubernetes Network Security”Congratulations!
You have successfully completed Module 03 — Kubernetes Network Security.
Throughout this module, you learned how enterprise organizations secure networking in Amazon EKS using modern cloud-native security practices.
You covered:
- Kubernetes Networking Fundamentals
- Container Network Interface (CNI) Plugins
- Network Policies
- Ingress Controllers
- Egress Security
- DNS Security
- Service Mesh & Mutual TLS
- East-West Traffic Protection
- Zero Trust Networking
- Enterprise Kubernetes Network Architecture
- Network Security Best Practices
You should now be able to:
- Design secure Kubernetes networking architectures
- Implement Zero Trust networking
- Secure ingress, egress and east-west traffic
- Deploy and manage Service Mesh technologies
- Protect DNS and service discovery
- Build highly available Amazon EKS networking environments
- Monitor network activity and detect threats
- Apply enterprise security controls and governance
These skills form the networking foundation required for production Kubernetes environments and prepare you for advanced cloud security roles.
What’s Next?
Section titled “What’s Next?”In Module 04 — Kubernetes Workload Security, you will shift your focus from securing the network to securing the workloads themselves.
You will learn how to:
- Secure Pods and Containers
- Apply Pod Security Standards (PSS)
- Configure Security Contexts
- Manage Linux Capabilities
- Protect Secrets and sensitive data
- Secure container images
- Enforce admission policies
- Prevent container escape attacks
- Implement runtime protection
- Build defense-in-depth for Kubernetes workloads
Together, Modules 03 and 04 provide the core security controls required to build and operate secure, enterprise-grade Amazon EKS environments.