2 Answers
- Newest
- Most votes
- Most comments
1
Hi,
Let's quickly review how networking typically works in a Kubernetes environment, especially with Amazon EKS:
- Pod IP visibility: In a standard Kubernetes networking model, pod IPs are typically only visible within the cluster. The Node IP is used for external communication.
- VPC Flow Logs limitations: VPC Flow Logs capture information about IP traffic going to and from network interfaces in your VPC. However, they operate at the EC2 instance (node) level, not at the pod level.
- Network Address Translation (NAT): When pods communicate with external resources, their traffic is usually NAT'ed through the node's IP address. This is why you're seeing the node IP (192.168.47.183) in the VPC Flow Logs instead of individual pod IPs.
Given these constraints, it's generally not possible to directly identify specific pod traffic using VPC Flow Logs alone. The logs will show traffic from the node IP, as you've observed.
Please consider alternative approaches like enabling AWS VPC CNI Plugin with Pod ENI (Secondary ENI Allocation), Kubernetes Network Policies, Service Mesh and Container level logging and so on.
Hope it helps.
Relevant content
- asked 3 years ago
- AWS OFFICIALUpdated 6 months ago
