What is a NAT Gateway and why do AKS and VM workloads use it?
IntermediateConceptNetworking
Answer
NAT Gateway gives a subnet outbound internet connectivity through one or more static public IPs or prefixes, with 64,512 SNAT ports per public IP allocated on demand. It takes precedence over load balancer outbound rules and instance public IPs for egress.
Two reasons to use it: predictable egress IPs to whitelist at partners, and avoiding SNAT port exhaustion, which happens with load balancer outbound rules under heavy connection churn. AKS supports --outbound-type managedNATGateway or userAssignedNATGateway. Since default outbound access is being retired for new VNets, explicit egress like this is the norm.
More on Networking
What is a VNet and how does it compare to an AWS VPC?BeginnerHow many IP addresses does Azure reserve in each subnet?BeginnerWhat is a Network Security Group and how are its rules evaluated?BeginnerIf an NSG is on both the subnet and the NIC, how is traffic evaluated?AdvancedWhat are service tags and why use them in NSG rules?BeginnerWhat is an Application Security Group (ASG)?Intermediate