aws / amazon-vpc-cni-k8s

Networking plugin repository for pod networking in Kubernetes using Elastic Network Interfaces on AWS
Apache License 2.0
2.25k stars 734 forks source link

Disabling SNAT for non-managed ENIs possible? #2927

Open muelleme opened 3 months ago

muelleme commented 3 months ago

What happened:

Hello!

We have a use-case where we run pods with EKS in host network mode and attach a 2nd ENI to the node. The 2nd ENI is tagged with node.k8s.amazonaws.com/no_manage: true and we expected it to be completely left alone by the CNI. However, the iptables rules set up by the CNI force all traffic going out via that ENI to be SNATed and the source IP gets changed to the primary node IP. Is that the intended behaviour, and if yes, is there a way to disable this? We do not have a NAT gateway running, so using AWS_VPC_K8S_CNI_EXTERNALSNAT = true is not an option for us, as it breaks all other use cases in the cluster.

Thanks in advance, any help is highly appreciated!

Environment:

github-actions[bot] commented 1 month ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days