Interview Prep/Networking/Kubernetes Networking

Your pods need a fixed outbound IP for a partner's allow list. How do you do it?

IntermediateScenarioKubernetes Networking
Answer

Situation read → Pod IPs change and node IPs vary, so egress needs a stable exit.

What I'd do →

  1. Route pod egress through NAT gateways with Elastic IPs, which are stable per AZ
  2. With the VPC CNI custom networking SNAT happens at the node; check AWS_VPC_K8S_CNI_EXTERNALSNAT
  3. For finer control use an egress gateway (Cilium Egress Gateway, Istio egress gateway) pinned to specific nodes with EIPs
  4. Provide the partner with the IPs
  5. Test with kubectl run -it --rm curl --image=curlimages/curl -- curl -s ifconfig.me

Why → The source IP the partner sees is whatever NAT sits last in the path.

Interview tip → Say you verify with an external echo service.

All Networking questions Roadmap: Networking for DevOps

More on Kubernetes Networking