Back to all scenarios
Scenario #192
Networking
K8s v1.20, AWS EKS

Pod-to-External Service Connectivity Failures Due to Egress Network Policy

Pods failed to connect to an external service due to an overly restrictive egress network policy.

Find this helpful?
What Happened

An egress network policy was too restrictive and blocked traffic from the pods to external services, leading to connectivity issues.

Diagnosis Steps
  • 1Used kubectl describe networkpolicy to inspect egress rules and found that the policy was blocking all outbound traffic.
  • 2Verified connectivity to the external service and confirmed the network policy was the cause.
Root Cause

An overly restrictive egress network policy prevented pods from accessing external services.

Fix/Workaround
• Modified the egress network policy to allow traffic to the required external service.
• Applied the updated policy and tested connectivity.
Lessons Learned

Be mindful when applying network policies, especially egress rules that affect external connectivity.

How to Avoid
  • 1Test network policies in a staging environment before applying them in production.
  • 2Implement gradual rollouts for network policies to avoid wide-scale disruptions.