Connect applications in Azure Container Apps

Azure Container Apps exposes each container app through a domain name if ingress is enabled. Ingress endpoints can be exposed either publicly to the world or internally and only available to other container apps in the same environment.

Once you know a container app's domain name, then you can call the location within your application code to connect multiple container apps together.

Note

When you call another container in the same environment using the FQDN, the network traffic never leaves the environment.

A sample solution showing how you can call between containers using both the FQDN Location or Dapr can be found on Azure Samples

Location

A container app's location is composed of values associated with its environment, name, and region. Available through the azurecontainerapps.io top-level domain, the fully qualified domain name (FQDN) uses:

  • the container app name
  • the environment unique identifier
  • region name

The following diagram shows how these values are used to compose a container app's fully qualified domain name.

Azure Container Apps container app fully qualified domain name.

Get fully qualified domain name

The az containerapp show command returns the fully qualified domain name of a container app.

az containerapp show \
  --resource-group <RESOURCE_GROUP_NAME> \
  --name <CONTAINER_APP_NAME> \
  --query properties.configuration.ingress.fqdn

In this example, replace the placeholders surrounded by <> with your values.

The value returned from this command resembles a domain name like the following example:

myapp.happyhill-70162bb9.canadacentral.azurecontainerapps.io

Dapr location

Developing microservices often requires you to implement patterns common to distributed architecture. Dapr allows you to secure microservices with mutual TLS, trigger retries when errors occur, and take advantage of distributed tracing when Azure Application Insights is enabled.

A microservice that uses Dapr is available through the following URL pattern:

Azure Container Apps container app location with Dapr.

Next steps