fINTERACTIVE FIELD GUIDES
Networking23 / 30

AKS Egress to Azure Services

Trace pod outbound traffic to public and private Azure services, including Container Apps, Functions, and Managed Redis.

Learning status: Not practiced

An AKS pod calling an Azure service uses two independent paths:

  1. Network path: DNS, routes, firewalls, and the destination endpoint must allow the connection.
  2. Identity and authorization: the workload obtains a token for the destination and the service permits the requested operation.

Workload ID does not create outbound connectivity. A timeout or name-resolution failure is usually a network-path problem; an HTTP 401 or 403 is usually an identity, token, or service-authorization problem.

Public service endpoints

AKS cluster egress is configured with an outbound type such as Load Balancer, NAT Gateway, or User-Defined Routing. The chosen type and any route table or firewall determine how packets leave the cluster and which source IP the destination sees. A none outbound type does not provide a cluster-managed egress path; the required route must be configured separately.

If a destination service uses a firewall or IP allowlist:

  • Confirm the actual public source IP after all cluster and network-appliance translation.
  • Allow the required destination ports and service endpoints in firewalls and network security rules.
  • Check that the selected route sends traffic through the expected NAT gateway, firewall, or other next hop.

Do not assume the node address or an old cluster outbound IP is the address the service sees. Changing the AKS outbound configuration can change the egress IP and require updates to destination allowlists.

Private endpoints and private DNS

A private endpoint provides a private IP for a particular service resource. It does not automatically connect every VNet to that address. Verify each part of the path:

  1. The endpoint connection is approved and its subnet and network policies are configured for the service.
  2. The AKS VNet can route to the endpoint VNet, directly or through a supported peering or network appliance design.
  3. Network security groups, user-defined routes, firewalls, and service network rules allow the flow.
  4. DNS from the pod resolves the service's normal hostname to the private endpoint IP. Configure the service-specific Private DNS zone and VNet links, or the appropriate custom DNS forwarding.

Keep using the service's expected hostname so TLS and service routing work as intended. A successful DNS lookup alone does not prove that the route or TCP connection is allowed.

Calling Azure Functions and Container Apps

An Azure Function may use a public endpoint with access restrictions, or a private endpoint. For a private Function endpoint, AKS needs both the network route and DNS configuration that resolves the Function hostname privately. Entra authentication and the Function API's authorization rules remain separate checks; see Call an Azure Functions API from a Pod.

Azure Container Apps can use an external or internal environment. An internal environment has no public endpoint and is reachable through its virtual network. For an AKS pod to call an internal app, the networks must have a path to the Container Apps environment and DNS must resolve the app's environment domain to the internal address. External ingress exposes an app through its environment; in an internal environment, the app still has no internet-facing endpoint. Check the environment's ingress and public-network-access settings as well as VNet connectivity.

Azure Managed Redis and Storage have their own endpoint and private-network requirements. An identity that is authorized by the service still cannot connect if DNS, routes, or network rules block it. See Connect a Pod to Azure Managed Redis and Blob Storage access.

Troubleshoot from the pod outward

Check in this order, using the exact hostname and port configured by the application. For the route and source IP, inspect the AKS resource's Networking settings and the associated Azure network resources; a Helm chart usually does not configure those.

  1. DNS: Does the service hostname resolve to the expected public or private address from inside the pod? If not, inspect CoreDNS and custom DNS forwarding, then the service's Private DNS zone and VNet links.
  2. Pod policy: If only some pods fail, check Kubernetes NetworkPolicy or Cilium policy and proxy settings in the workload's Deployment or Helm values.
  3. Route and TCP: Can the pod establish a connection to that address and port? Check the AKS outbound type, node subnet route table and effective routes, NAT Gateway association, peering, NSGs, and Azure Firewall rules or logs.
  4. TLS and HTTP: Does the TLS handshake succeed? If the service returns 401 or 403, investigate token audience, authentication, and service permissions rather than changing routes.
  5. Destination policy: Check the service firewall, access restrictions, and private endpoint connection state.

Compare DNS and connectivity from the pod with the node or another VNet workload only as a diagnostic; different subnets, DNS settings, and routes can produce different results.

Sources: Customize cluster egress with AKS outbound types, AKS network concepts, Azure Container Apps networking, Integrate a virtual network with an Azure Container Apps environment, Azure Private Endpoint DNS configuration.