Skip to content

Commit 80e31d0

Browse files
authored
Merge pull request #226165 from cebundy/aca-ingress
[Container Apps] Update ingress documentation
2 parents a007f45 + d480c4c commit 80e31d0

26 files changed

+903
-310
lines changed

articles/container-apps/.openpublishing.redirection.container-apps.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@
99
"source_path_from_root": "/articles/container-apps/monitor.md",
1010
"redirect_url": "/azure/container-apps/logging",
1111
"redirect_document_id": false
12+
},
13+
{
14+
"source_path_from_root": "/articles/container-apps/ingress.md",
15+
"redirect_url": "/azure/container-apps/ingress-overview",
16+
"redirect_document_id": false
1217
}
1318
]
1419
}

articles/container-apps/TOC.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,12 @@
4444
href: application-lifecycle-management.md
4545
- name: Microservices
4646
href: microservices.md
47-
- name: Networking
47+
- name: Networking and ingress
4848
items:
4949
- name: Architecture overview
5050
href: networking.md
51+
- name: Ingress
52+
href: ingress-overview.md
5153
- name: Deploy with an external environment
5254
href: vnet-custom.md
5355
- name: Deploy with an internal environment
@@ -96,8 +98,19 @@
9698
href: managed-identity-image-pull.md
9799
- name: Manage revisions
98100
href: revisions-manage.md
99-
- name: Set up HTTPS or TCP ingress
100-
href: ingress.md
101+
- name: Ingress
102+
items:
103+
- name: Configure ingress
104+
href: ingress-how-to.md
105+
- name: Configure IP restrictions
106+
href: ip-restrictions.md
107+
- name: Add client certificates
108+
href: client-certificate-authorization.md
109+
- name: Configure traffic-splitting
110+
href: traffic-splitting.md
111+
- name: Session affinity
112+
href: sticky-sessions.md
113+
displayName: Sticky sessions
101114
- name: Custom domains and certificates
102115
items:
103116
- name: Set up container app custom domain
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
title: Configure client certificate authentication in Azure Container Apps
3+
description: How to configure client authentication in Azure Container Apps.
4+
services: container-apps
5+
author: craigshoemaker
6+
ms.service: container-apps
7+
ms.topic: how-to
8+
ms.date: 03/29/2023
9+
ms.author: cshoe
10+
---
11+
12+
# Configure client certificate authentication in Azure Container Apps
13+
14+
Azure Container Apps supports client certificate authentication (also known as mutual TLS or mTLS) that allows access to your container app through two-way authentication. This article shows you how to configure client certificate authorization in Azure Container Apps.
15+
16+
When client certificates are used, the TLS certificates are exchanged between the client and your container app to authenticate identity and encrypt traffic. Client certificates are often used in "zero trust" security models to authorize client access within an organization.
17+
18+
For example, you may want to require a client certificate for a container app that manages sensitive data.
19+
20+
Container Apps accepts client certificates in the PKCS12 format are that issued by a trusted certificate authority (CA), or are self-signed.
21+
22+
## Configure client certificate authorization
23+
24+
Set the `clientCertificateMode` property in your container app template to configure support of client certificates.
25+
26+
The property can be set to one of the following values:
27+
28+
- `require`: The client certificate is required for all requests to the container app.
29+
- `accept`: The client certificate is optional. If the client certificate isn't provided, the request is still accepted.
30+
- `ignore`: The client certificate is ignored.
31+
32+
Ingress passes the client certificate to the container app if `require` or `accept` are set.
33+
34+
The following ARM template example configures ingress to require a client certificate for all requests to the container app.
35+
36+
```json
37+
{
38+
"properties": {
39+
"configuration": {
40+
"ingress": {
41+
"clientCertificateMode": "require"
42+
}
43+
}
44+
}
45+
}
46+
```
47+
48+
## Next Steps
49+
50+
> [!div class="nextstepaction"]
51+
> [Configure ingress](ingress-how-to.md)

articles/container-apps/communicate-between-microservices.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ zone_pivot_groups: container-apps-image-build-type
1313

1414
# Tutorial: Communication between microservices in Azure Container Apps
1515

16-
Azure Container Apps exposes each container app through a domain name if [ingress](ingress.md) is enabled. Ingress endpoints for container apps within an external environment can be either publicly accessible or only available to other container apps in the same [environment](environment.md).
16+
Azure Container Apps exposes each container app through a domain name if [ingress](ingress-how-to.md) is enabled. Ingress endpoints for container apps within an external environment can be either publicly accessible or only available to other container apps in the same [environment](environment.md).
1717

1818
Once you know the fully qualified domain name for a given container app, you can make direct calls to the service from other container apps within the shared environment.
1919

articles/container-apps/connect-apps.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,17 @@ ms.custom: ignite-fall-2021, event-tier1-build-2022
1212

1313
# Connect applications in Azure Container Apps
1414

15-
Azure Container Apps exposes each container app through a domain name if [ingress](ingress.md) 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](environment.md).
15+
Azure Container Apps exposes each container app through a domain name if [ingress](ingress-overview.md) is enabled. Ingress endpoints can be exposed either publicly to the world and to other container apps in the same environment, or ingress can be limited to only other container apps in the same [environment](environment.md).
1616

17-
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.
17+
You can call other container apps in the same environment from your application code using one of the following methods:
18+
19+
- default fully qualified domain name (FQDN)
20+
- a custom domain name
21+
- the container app name
22+
- a Dapr URL
1823

1924
> [!NOTE]
20-
> When you call another container in the same environment using the FQDN, the network traffic never leaves the environment.
25+
> When you call another container in the same environment using the FQDN or app name, the network traffic never leaves the environment.
2126
2227
A sample solution showing how you can call between containers using both the FQDN Location or Dapr can be found on [Azure Samples](https://github.com/Azure-Samples/container-apps-connect-multiple-apps)
2328

@@ -37,7 +42,7 @@ The following diagram shows how these values are used to compose a container app
3742

3843
## Dapr location
3944

40-
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.
45+
Developing microservices often requires you to implement patterns common to distributed architecture. Dapr allows you to secure microservices with mutual TLS (client certificates), trigger retries when errors occur, and take advantage of distributed tracing when Azure Application Insights is enabled.
4146

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

articles/container-apps/index.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ landingContent:
5353
url: manage-secrets.md
5454
- text: Manage revisions
5555
url: revisions-manage.md
56-
- text: Set up HTTP ingress
57-
url: ingress.md
56+
- text: Set up ingress
57+
url: ingress-how-to.md
5858
- text: Connect multiple apps
5959
url: connect-apps.md
6060
- text: Use a custom VNET
Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
---
2+
title: Configure Ingress for your app in Azure Container Apps
3+
description: How to configure ingress for your container app
4+
services: container-apps
5+
author: craigshoemaker
6+
ms.service: container-apps
7+
ms.topic: how-to
8+
ms.date: 03/28/2023
9+
ms.author: cshoe
10+
ms.custom: ignite-fall-2021, event-tier1-build-2022
11+
zone_pivot_groups: arm-azure-cli-portal
12+
---
13+
14+
# Configure Ingress for your app in Azure Container Apps
15+
16+
This article shows you how to enable [ingress](ingress-overview.md) features for your container app. Ingress is an application-wide setting. Changes to ingress settings apply to all revisions simultaneously, and don't generate new revisions.
17+
18+
## Ingress settings
19+
20+
You can set the following ingress template properties:
21+
22+
| Property | Description | Values | Required |
23+
|---|---|---|---|
24+
| `allowInsecure` | Allows insecure traffic to your container app. When set to `true` HTTP requests to port 80 aren't automatically redirected to port 443 using HTTPS, allowing insecure connections.| `false` (default), `true` enables insecure connections| No |
25+
| `clientCertificateMode` | Client certificate mode for mTLS authentication. Ignore indicates server drops client certificate on forwarding. Accept indicates server forwards client certificate but doesn't require a client certificate. Require indicates server requires a client certificate. | `Required`, `Accept`, `Ignore` (default) | No |
26+
| `customDomains` | Custom domain bindings for Container Apps' hostnames. See [Custom domains and certificates](custom-domains-certificates.md) | An array of bindings | No |
27+
| `exposedPort` | (TCP ingress only) The port TCP listens on. If `external` is `true`, the value must be unique in the Container Apps environment. | A port number from `1` to `65535`. (can't be `80` or `443`) | No |
28+
| `external` | Allow ingress to your app from outside its Container Apps environment. |`true` or `false`(default) | Yes |
29+
| `ipSecurityRestrictions` | IP ingress restrictions. See [Set up IP ingress restrictions](ip-restrictions.md) | An array of rules | No |
30+
| `stickySessions.affinity` | Enables [session affinity](sticky-sessions.md). | `none` (default), `sticky` | No |
31+
| `targetPort` | The port your container listens to for incoming requests. | Set this value to the port number that your container uses. For HTTP ingress, your application ingress endpoint is always exposed on port `443`. | Yes |
32+
| `traffic` | [Traffic splitting](traffic-splitting.md) weights split between revisions. | An array of rules | No |
33+
| `transport` | The transport protocol type. | auto (default) detects HTTP/1 or HTTP/2, `http` for HTTP/1, `http2` for HTTP/2, `tcp` for TCP. | No |
34+
35+
36+
## Enable ingress
37+
38+
You can configure ingress for your container app using the Azure CLI, an ARM template, or the Azure portal.
39+
40+
::: zone pivot="azure-cli"
41+
42+
# [Azure CLI](#tab/azure-cli)
43+
44+
This `az containerapp ingress enable` command enables ingress for your container app. You must specify the target port, and you can optionally set the exposed port if your transport type is `tcp`.
45+
46+
```azurecli
47+
az containerapp ingress enable \
48+
--name <app-name> \
49+
--resource-group <resource-group> \
50+
--target-port <target-port> \
51+
--exposed-port <tcp-exposed-port> \
52+
--transport <transport> \
53+
--type <external>
54+
--allow-insecure
55+
```
56+
57+
`az containerapp ingress enable` ingress arguments:
58+
59+
| Option | Property | Description | Values | Required |
60+
| --- | --- | --- | --- | --- |
61+
| `--type` | external | Allow ingress to your app from anywhere, or limit ingress to its internal
62+
Container Apps environment. | `external` or `internal` | Yes |
63+
|`--allow-insecure` | allowInsecure | Allow HTTP connections to your app. | | No |
64+
| `--target-port` | targetPort | The port your container listens to for incoming requests. | Set this value to the port number that your container uses. Your application ingress endpoint is always exposed on port `443`. | Yes |
65+
|`--exposed-port` | exposedPort | (TCP ingress only) An port for TCP ingress. If `external` is `true`, the value must be unique in the Container Apps environment if ingress is external. | A port number from `1` to `65535`. (can't be `80` or `443`) | No |
66+
|`--transport` | transport | The transport protocol type. | auto (default) detects HTTP/1 or HTTP/2, `http` for HTTP/1, `http2` for HTTP/2, `tcp` for TCP. | No |
67+
68+
::: zone-end
69+
70+
::: zone pivot="azure-portal"
71+
72+
# [Portal](#tab/portal)
73+
74+
Enable ingress for your container app by using the portal.
75+
76+
You can enable ingress when you create your container app, or you can enable ingress for an existing container app.
77+
- To configure ingress when you create your container app, select **Ingress** from the **App Configuration** tab of the container app creation wizard.
78+
- To configure ingress for an existing container app, select **Ingress** from the **Settings** menu of the container app resource page.
79+
80+
### Enabling ingress for your container app:
81+
82+
You can configure ingress when you create your container app by using the Azure portal.
83+
84+
85+
1. Set **Ingress** to **Enabled**.
86+
1. Configure the ingress settings for your container app.
87+
1. Select **Limited to Container Apps Environment** for internal ingress or **Accepting traffic from anywhere** for external ingress.
88+
1. Select the **Ingress Type**: **HTTP** or **TCP** (TCP ingress is only available in environments configured with a custom VNET).
89+
1. If *HTTP* is selected for the **Ingress Type**, select the **Transport**: **Auto**, **HTTP/1** or **HTTP/2**.
90+
1. Select **Insecure connections** if you want to allow HTTP connections to your app.
91+
1. Enter the **Target port** for your container app.
92+
1. If you have selected **TCP** for the **Transport** option, enter the **Exposed port** for your container app. The exposed port number can be `1` to `65535`. (can't be `80` or `443`)
93+
94+
The **Ingress** settings page for your container app also allows you to configure **IP Restrictions**. For information to configure IP restriction, see [IP Restrictions](ip-restrictions.md).
95+
96+
::: zone-end
97+
98+
::: zone pivot="azure-resource-manager"
99+
100+
# [ARM template](#tab/arm-template)
101+
102+
Enable ingress for your container app by using the `ingress` configuration property. Set the `external` property to `true`, and set your `transport` and `targetPort` properties.
103+
-`external` property can be set to *true* for external or *false* for internal ingress.
104+
- Set the `transport` to `auto` to detect HTTP/1 or HTTP/2, `http` for HTTP/1, `http2` for HTTP/2, or `tcp` for TCP.
105+
- Set the `targetPort` to the port number that your container uses. Your application ingress endpoint is always exposed on port `443`.
106+
- Set the `exposedPort` property if transport type is `tcp` to a port for TCP ingress. The value must be unique in the Container Apps environment if ingress is external. A port number from `1` to `65535`. (can't be `80` or `443`)
107+
108+
```json
109+
{
110+
...
111+
"configuration": {
112+
"ingress": {
113+
"external": true,
114+
"transport": "tcp",
115+
"targetPort": 80,
116+
"exposedPort": 8080,
117+
},
118+
}
119+
}
120+
```
121+
122+
---
123+
124+
::: zone-end
125+
126+
::: zone pivot="azure-cli"
127+
128+
## Disable ingress
129+
130+
# [Azure CLI](#tab/azure-cli)
131+
132+
Disable ingress for your container app by using the `az containerapp ingress` command.
133+
134+
```azurecli
135+
az containerapp ingress disable \
136+
--name <app-name> \
137+
--resource-group <resource-group> \
138+
```
139+
140+
::: zone-end
141+
142+
::: zone pivot="azure-portal"
143+
144+
# [Portal](#tab/portal)
145+
146+
You can disable ingress for your container app using the portal.
147+
148+
1. Select **Ingress** from the **Settings** menu of the container app page.
149+
1. Deselect the **Ingress** **Enabled** setting.
150+
1. Select **Save**.
151+
152+
:::image type="content" source="media/ingress/screenshot-disable-ingress.png" alt-text="Sceenshot of disabling container app ingress.":::
153+
154+
::: zone-end
155+
156+
::: zone pivot="azure-resource-manager"
157+
158+
# [ARM template](#tab/arm-template)
159+
160+
Disable ingress for your container app by omitting the `ingress` configuration property from `properties.configuration` entirely.
161+
162+
---
163+
164+
::: zone-end
165+
166+
## Next steps
167+
168+
> [!div class="nextstepaction"]
169+
> [Ingress in Azure Container Apps](ingress-overview.md)

0 commit comments

Comments
 (0)