Azure - AKS - Egress

What is Egress in Kubernetes?

Egress is the outbound traffic leaving a pod, node, or cluster and going to another destination.

Simply:

Ingress = Traffic coming INTO the cluster

Egress = Traffic going OUT OF the cluster 

 

Example of Egress

Suppose your application pod calls an external API:

Pod
 ↓
api.stripe.com 

or

Pod
 ↓
Azure Storage

or

Pod
 ↓
Database outside cluster

All of these are egress traffic.


Ingress vs Egress

Ingress

Traffic enters the cluster:

 User
 ↓
Ingress Controller
 ↓
Service
 ↓
Pod


Egress

Traffic leaves the cluster:

Pod
 ↓
Internet / Storage / API

 

AKS Egress Flow

Typical AKS architecture:

Pod
 ↓
Node
 ↓
Subnet
 ↓
NAT Gateway / Load Balancer SNAT
 ↓
Internet

 

Why Egress Matters

Security teams often ask:

"Which destinations can pods access?"

Without controls:

Pod
 ↓
Any Internet Address 

This may violate security policies.

 

How Egress is Controlled

1. Kubernetes Network Policies

Using Kubernetes Network Policies, you can restrict pod communications.

Example:

Frontend Pod
 ↓
Backend Pod

Allowed

Comments

Popular posts from this blog

Azure Migrate

Azure -- All Networking Components

All Kuberneters - Components