iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
🌐

Azure Container Apps Ingress Configuration Patterns: Part 6 (Disabled Ingress for Batch Apps)

に公開

Introduction

This article is a record of my experience building and exploring Ingress configuration patterns in Azure Container Apps.

https://zenn.dev/georgeosddev/articles/azure-container-apps-ingress-architecture-patterns

In this article, I will cover pattern 6.

Architecture

Procedure

Create an app with Ingress disabled.

Configure Ingress in Azure Container Apps | Microsoft Learn

portal-app-create-without-ingress

I used the following container image for deployment. It only contains a cron job that runs a shell script every minute.

FROM alpine:latest

# Create hello.sh script
RUN mkdir -p /app && cat > /app/hello.sh << 'EOF'
#!/bin/sh
echo "$(date '+%Y-%m-%d %H:%M:%S') Hello"
EOF
RUN chmod +x /app/hello.sh

# Set up crontab (run every minute)
RUN mkdir -p /var/spool/cron/crontabs && \
    echo "* * * * * /app/hello.sh" > /var/spool/cron/crontabs/root

# Use busybox crond
CMD ["busybox", "crond", "-f", "-l", "2"]

app-logstream

Since Ingress is disabled, no application URL is displayed.

app-overview

Verification

Access via Console

Access is possible.

app-console

Access from within VNet

Since I am using a custom VNet environment, I will try accessing it from a resource within the VNet. The Nginx app I created previously (aca-in-vnet-nginx) is accessible as expected.

For aca-in-vnet-noingress which was just created, name resolution using the environment's default suffix works. This is because DNS settings for VNet-scoped Ingress have been configured.

https://zenn.dev/georgeosddev/articles/azure-container-apps-ingress-pattern-4#vnet-スコープのイングレスの-dns-の設定

However, trying to access via HTTPS results in a 404 error, indicating the app does not exist.

root@1d121b7ce20b:/home# nslookup aca-in-vnet-nginx.bluewater-b1a7834e.japaneast.azurecontainerapps.io
Server:         127.0.0.11
Address:        127.0.0.11#53

Non-authoritative answer:
Name:   aca-in-vnet-nginx.bluewater-b1a7834e.japaneast.azurecontainerapps.io
Address: 10.0.18.96

root@1d121b7ce20b:/home# nslookup aca-in-vnet-noingress.bluewater-b1a7834e.japaneast.azurecontainerapps.io
Server:         127.0.0.11
Address:        127.0.0.11#53

Non-authoritative answer:
Name:   aca-in-vnet-noingress.bluewater-b1a7834e.japaneast.azurecontainerapps.io
Address: 10.0.18.96

root@1d121b7ce20b:/home# curl -I https://aca-in-vnet-nginx.bluewater-b1a7834e.japaneast.azurecontainerapps.io
HTTP/2 200
server: nginx/1.28.1
date: Wed, 18 Feb 2026 04:59:44 GMT
content-type: text/html
content-length: 615
last-modified: Tue, 23 Dec 2025 18:40:33 GMT
etag: "694ae221-267"
accept-ranges: bytes

root@1d121b7ce20b:/home# curl -I https://aca-in-vnet-noingress.bluewater-b1a7834e.japaneast.azurecontainerapps.io
HTTP/2 404
content-type: text/html; charset=utf-8
content-length: 1946
date: Wed, 18 Feb 2026 04:59:54 GMT

Access from within the Environment

Name resolution with the environment's default suffix works. However, name resolution using <AppName> no longer works.

root@aca-in-vnet-nginx--0000001-6f8cb4fc87-dlqfm:/# nslookup aca-in-vnet-noingress.bluewater-b1a7834e.japaneast.azurecontainerapps.io
Server:         127.0.0.11
Address:        127.0.0.11#53

Non-authoritative answer:
Name:   aca-in-vnet-noingress.bluewater-b1a7834e.japaneast.azurecontainerapps.io
Address: 10.0.18.96

root@aca-in-vnet-nginx--0000001-6f8cb4fc87-dlqfm:/# nslookup aca-in-vnet-noingress
;; Got recursion not available from 127.0.0.11
;; Got recursion not available from 127.0.0.11
;; Got recursion not available from 127.0.0.11
Server:         127.0.0.11
Address:        127.0.0.11#53

** server can't find aca-in-vnet-noingress: NXDOMAIN

root@aca-in-vnet-nginx--0000001-6f8cb4fc87-dlqfm:/# nslookup aca-in-vnet-nodeapp
;; Got recursion not available from 127.0.0.11
Server:         127.0.0.11
Address:        127.0.0.11#53

Name:   aca-in-vnet-nodeapp.k8se-apps.svc.cluster.local
Address: 100.100.227.66
;; Got recursion not available from 127.0.0.11
Speculation on platform internal behavior regarding Ingress status

Copilot said:

Looking at the observation results (aca-in-vnet-nodeapp is resolvable, while aca-in-vnet-noingress returns NXDOMAIN), it is highly likely that the implementation is such that "only apps with Ingress enabled are registered as 'Service names' in the environment DNS." Below is a summary of speculations on what the platform switches internally.

1) Premise: ACA's "Ingress" manages not only "external exposure" but also "intra-environment reachability"

As explained in Microsoft Learn, Ingress is a mechanism for allowing access from public, VNet, or other apps within the same environment. In other words, enabling Ingress itself is an operation to "create a path."

The environment also has an edge ingress proxy (Envoy-based), which handles TLS termination, routing, load balancing, session affinity, and revision splitting.

Given this, it is not surprising that the design goes beyond just "not registering routes in the proxy," but also couples it with environmental name resolution (service discovery) to "exclude" it.

2) Internal structure suggested by your nslookup results

Ingress-enabled app (resolvable)

aca-in-vnet-nodeapp.k8se-apps.svc.cluster.local  -> 100.100.227.66

The format k8se-apps.svc.cluster.local is typical for Kubernetes Service DNS. This implies that aca-in-vnet-nodeapp internally creates a K8s Service (equivalent to ClusterIP), and a DNS A record for that Service exists.

Ingress-disabled app (NXDOMAIN)

server can't find aca-in-vnet-noingress: NXDOMAIN

NXDOMAIN means "no record for that name exists in the zone." Therefore, it is speculated that an Ingress-disabled app does not create a Service (i.e., is not registered in DNS), or at least does not register the "app name -> Service" mapping.

3) The likely "switching point" (most important)

✅ Speculation A: Only create "app-level K8s Service" when Ingress is ON

  • Ingress ON

    • Create Service (appName)
    • Create Endpoints/EndpointSlice (to each replica)
    • Register Host/Path routes to Envoy (ingress proxy)
    • Result: appName resolves via k8se-apps.svc.cluster.local
  • Ingress OFF

    • Do not create Service (appName) (or do not create anything other than "headless")
    • Result: App name not in CoreDNS, returns NXDOMAIN
    • This hypothesis is consistent with your DNS results (Ingress ON is resolvable via Service DNS).

This also aligns with the official explanation that "Ingress also provides reachability within the environment."

4) Why such a design? (Rationality)

If a Service were created even when Ingress is OFF, at least the following issues would arise:

Ambiguous reachability contracts
If a user can reach it by name even when Ingress is disabled, they might misunderstand it as being "internally exposed."
Lack of routing/policy application points
ACA's traffic control (revision splitting, session affinity, etc.) is primarily handled by the ingress proxy. If a Service is provided with Ingress OFF, a path bypassing the proxy directly to the Pod could be created, making it difficult for ACA to provide guaranteed behavior.
Alignment with "scale to 0" and revision management
If it is stably reachable by name, there is a need for "something to always receive it," which conflicts with event-driven scaling.
Given these points, treating Ingress ON as "publish as service" and Ingress OFF as "do not publish" is a natural binary switch.

5) How to get "circumstantial evidence" (without kubectl)

Trying the following within the container will increase the confidence in the hypothesis.

(1) Is it NXDOMAIN even if the FQDN is specified?

nslookup aca-in-vnet-noingress.k8se-apps.svc.cluster.local
nslookup aca-in-vnet-noingress.svc.cluster.local

If these are also NXDOMAIN, it is highly likely that "no Service record exists at all."

(2) Existence of "SRV records" for Ingress-enabled apps

nslookup -type=SRV _http._tcp.aca-in-vnet-nodeapp.k8se-apps.svc.cluster.local

This provides a hint about what type of Service is created (though SRV records aren't always present).

Conclusion (Speculative)

The most plausible speculation based on your results is:

ACA creates and publishes a Kubernetes Service (=DNS A record) corresponding to the app name only when Ingress is enabled, and does not create a Service or register it in DNS for apps with Ingress disabled.
Therefore, name resolution via appName from within the environment switches in conjunction with Ingress status.

This is consistent with the official explanation that Ingress is a "publishing mechanism that includes intra-environment reachability," and that the ingress proxy handles routing and load balancing.

If possible, could you provide two more pieces of information to identify the level at which the DNS name is disappearing?

Does aca-in-vnet-noingress.k8se-apps.svc.cluster.local return NXDOMAIN?
Is Dapr enabled for that noingress app? (Since Dapr enabled apps can sometimes have alternative paths for name resolution/reaching.)

You said:

root@aca-in-vnet-nginx--0000001-6f8cb4fc87-dlqfm:/# nslookup aca-in-vnet-noingress.k8se-apps.svc.cluster.local
;; Got recursion not available from 127.0.0.11
Server:         127.0.0.11
Address:        127.0.0.11#53

** server can't find aca-in-vnet-noingress.k8se-apps.svc.cluster.local: NXDOMAIN

root@aca-in-vnet-nginx--0000001-6f8cb4fc87-dlqfm:/# nslookup aca-in-vnet-noingress.svc.cluster.local
;; Got recursion not available from 127.0.0.11
Server:         127.0.0.11
Address:        127.0.0.11#53

** server can't find aca-in-vnet-noingress.svc.cluster.local: NXDOMAIN

root@aca-in-vnet-nginx--0000001-6f8cb4fc87-dlqfm:/# nslookup -type=SRV _http._tcp.aca-in-vnet-nodeapp.k8se-apps.svc.cluster.local
;; Got recursion not available from 127.0.0.11
Server:         127.0.0.11
Address:        127.0.0.11#53

_http._tcp.aca-in-vnet-nodeapp.k8se-apps.svc.cluster.local      service = 0 100 80 aca-in-vnet-nodeapp.k8se-apps.svc.cluster.local.

Copilot said:
Great additional data. With this, the speculation that "K8s Service (=DNS record) is issued only when Ingress is enabled" is strongly supported.

What can be said from the observations (highly certain speculation)

1) Nothing is registered under svc.cluster.local for Ingress-disabled apps

Your results:

aca-in-vnet-noingress.k8se-apps.svc.cluster.local -> NXDOMAIN
aca-in-vnet-noingress.svc.cluster.local -> NXDOMAIN
This strongly suggests that "no such Service exists" (the corresponding Service/EndpointSlice does not exist on the K8s API that CoreDNS references).

If "the Service existed but there were no Pods/endpoints," DNS would often return an A record (or lack of Pod records for headless). NXDOMAIN (name does not exist) is a different outcome. Here, the "absence of the name" suggests the Service itself is not created.

2) Ingress-enabled apps even have SRV records for HTTP = "Published as a service"

Your results:

_http._tcp.aca-in-vnet-nodeapp.k8se-apps.svc.cluster.local returns an SRV record
-> A service definition pointing to port 80 exists.
The fact that an SRV record appears means that not only is there an A record, but metadata stating "this Service provides HTTP (TCP/80)" is also provided via DNS.

Points likely switched internally (Concrete image of speculation)

According to Microsoft Learn, Container Apps Ingress is a mechanism to allow reachability from "Public," "VNet," or "Same Environment (other Container Apps)," and enabling Ingress activates routing control. (Ingress in Azure Container Apps | Microsoft Learn)

The environment also features a scalable edge ingress proxy (Envoy-based) that handles TLS termination, routing, load balancing, traffic splitting between revisions, and session affinity. (Configure ingress for an Azure Container Apps environment | Microsoft Learn)

Combining these with your DNS observations, the internal logic likely branches as follows:

✅ When Ingress = ON (whether Internal or External)
(a) Create K8s Service (e.g., aca-in-vnet-nodeapp)
Result: <app>.k8se-apps.svc.cluster.local is resolvable (A/SRV returned)
(b) Register route to Envoy (ingress proxy)
Host-based / path-based / revision-based routing functions guaranteed by ACA are realized here
(c) Publish to DNS as a "service publishing unit"
Allows other apps in the same environment to reach by app name.
Given that Ingress provides intra-environment reachability and the ingress proxy handles routing, treating Ingress ON as a "service publishing switch" is natural.

✅ When Ingress = OFF
(a) Do not create K8s Service (not published to DNS)
Result: <app>.*.svc.cluster.local is NXDOMAIN
(b) Do not create Envoy routes
Meaning it is "not a public HTTP service" = "name resolution is not provided"

Why "delete" even the DNS entries? (Design rationality)

While not officially documented, the following rationality can be considered based on the task distribution mentioned in Learn:

Clarifying reachability contracts
If name resolution and HTTP access were possible within the environment despite Ingress being OFF, users might be confused, thinking it is "internally exposed." Since Ingress is explained as a mechanism to control reachability, not providing a name when reachability is absent is consistent UX.

Centralizing the application points for routing functions (revision split, affinity, etc.) provided by ACA
As the ingress proxy is responsible for routing and session affinity, providing an easy path that bypasses it (hitting the Service directly) makes behavior guarantees difficult.

Verification 2: Setting up a Web Server in an app without Ingress

In the examples so far, the container itself did not start a Web server and did not expose a TCP port. There was no way to access this container regardless of Ingress status.

Therefore, I will try starting a web server within the container.

FROM alpine:latest

# Install Python3 and curl
RUN apk add --no-cache python3 curl

# Create hello.sh script (for cron)
RUN mkdir -p /app && cat > /app/hello.sh << 'EOF'
#!/bin/sh
echo "$(date '+%Y-%m-%d %H:%M:%S') Hello"
EOF
RUN chmod +x /app/hello.sh

# Set up crontab (run every minute)
RUN mkdir -p /var/spool/cron/crontabs && \
    echo "* * * * * /app/hello.sh" > /var/spool/cron/crontabs/root

# Create index.html for simple Web server
RUN mkdir -p /var/www/html && cat > /var/www/html/index.html << 'EOF'
<!DOCTYPE html>
<html>
<head>
    <title>Cron Worker</title>
</head>
<body>
    <h1>Cron Worker is Running</h1>
    <p>This container runs a cron job every minute.</p>
</body>
</html>
EOF

# Create start script
RUN cat > /app/start.sh << 'EOF'
#!/bin/sh
# Start Web server in background
cd /var/www/html
python3 -m http.server 8080 &
# Start cron in foreground
busybox crond -f -l 2
EOF
RUN chmod +x /app/start.sh

# Execute start script
CMD ["/app/start.sh"]

I confirmed that while HTTP access via localhost is possible, access via <AppName> or <AppName>.<EnvironmentSuffix> is not.

app-with-webserver

INFO: Connecting to the container 'aca-in-vnet-noingress'...
INFO: Successfully connected to container: 'aca-in-vnet-noingress'. [ Revision: 'aca-in-vnet-noingress--0000001', Replica: 'aca-in-vnet-noingress--0000001-5dd6b765b7-bvrml'].
/ # ps aux
PID   USER     TIME  COMMAND
    1 root      0:00 {start.sh} /bin/sh /app/start.sh
    7 root      0:00 python3 -m http.server 8080
    8 root      0:00 busybox crond -f -l 2
   21 root      0:00 /bin/sh
   52 root      0:00 /bin/sh
   67 root      0:00 /bin/sh
   80 root      0:00 /bin/sh
   86 root      0:00 /bin/sh
   92 root      0:00 ps aux
/ #
/ # curl localhost:8080
<!DOCTYPE html>
<html>
<head>
    <title>Cron Worker</title>
</head>
<body>
    <h1>Cron Worker is Running</h1>
    <p>This container runs a cron job every minute.</p>
</body>
</html>
/ #
/ # curl aca-in-vnet-noingress:8080
curl: (6) Could not resolve host: aca-in-vnet-noingress (Domain name not found)
/ # curl -I aca-in-vnet-noingress.bluewater-b1a7834e.japaneast.azurecontainerapps.io
HTTP/1.1 404 Not Found
content-type: text/html; charset=utf-8
content-length: 1946
date: Wed, 18 Feb 2026 05:59:59 GMT

/ # nslookup aca-in-vnet-noingress
Server:         127.0.0.11
Address:        127.0.0.11:53

** server can't find aca-in-vnet-noingress.k8se-apps.svc.cluster.local: NXDOMAIN

** server can't find aca-in-vnet-noingress.svc.cluster.local: NXDOMAIN

** server can't find aca-in-vnet-noingress.k8se-apps.svc.cluster.local: NXDOMAIN

** server can't find aca-in-vnet-noingress.cluster.local: NXDOMAIN

** server can't find aca-in-vnet-noingress.svc.cluster.local: NXDOMAIN

** server can't find aca-in-vnet-noingress.cluster.local: NXDOMAIN

Verification 3: What about via Dapr?

I will now make the previously created Python Web server callable via Dapr.

Procedure

https://learn.microsoft.com/en-us/azure/container-apps/enable-dapr?tabs=bicep1

I will use it for inter-service invocation. While ACA setup can be confusing, if you only need inter-service invocation, you don't need Env-level Dapr settings; just enabling Dapr on the app side is enough.

I will expose the Python server listening on port 8080 via HTTP as-is.

Enable-dapr

Invoking is well-documented in the Dapr official documentation.

https://docs.dapr.io/developing-applications/building-blocks/service-invocation/howto-invoke-discover-services/

The following document is slightly misleading.

https://learn.microsoft.com/en-us/azure/container-apps/connect-apps?tabs=bash#dapr-location

doc-dapr-location

It says ①Container App Name, but since this is the world of Dapr, it is technically dapr-app-id.

Execution

From inside the container

First, I will try it from itself.

Dapr runs on localhost:3500, so I can invoke it by specifying the dapr-app-id configured earlier (noingress) via path or header.

dapr-invoke-self

INFO: Connecting to the container 'aca-in-vnet-noingress'...
INFO: Successfully connected to container: 'aca-in-vnet-noingress'. [ Revision: 'aca-in-vnet-noingress--0000001', Replica: 'aca-in-vnet-noingress--0000001-859c5448ff-x6zqc'].
/ #
/ # curl http://localhost:3500/v1.0/invoke/noingress/method/
<!DOCTYPE html>
<html>
<head>
    <title>Cron Worker</title>
</head>
<body>
    <h1>Cron Worker is Running</h1>
    <p>This container runs a cron job every minute.</p>
</body>
</html>
/ #
/ # curl http://localhost:3500/ -H "dapr-app-id:noingress"
<!DOCTYPE html>
<html>
<head>
    <title>Cron Worker</title>
</head>
<body>
    <h1>Cron Worker is Running</h1>
    <p>This container runs a cron job every minute.</p>
</body>
</html>

From another container in the Env

I will try invoking the Ingress-disabled app from the Nginx container via Dapr. The invocation method is the same.

curl http://localhost:3500/v1.0/invoke/noingress/method/
curl http://localhost:3500/ -H "dapr-app-id:noingress"

I confirmed that it can be invoked successfully.

dapr-invoke-from-nginx

app-invoke-log

Discussion

When Ingress is not configured, the container can no longer be accessed from the outside. However, connecting via the portal console and exposing it as a service via Dapr makes it callable from other containers.

If inter-service invocation is the only anticipated use case, disabling Ingress and utilizing Dapr might be a valid option.

I was curious about how to handle health probes. I will study health probes next time.

Discussion