You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can expose additional TCP ports from your application. To learn more, see the [ingress concept article](ingress-overview.md#additional-tcp-ports).
168
+
169
+
170
+
::: zone pivot="azure-cli"
171
+
172
+
# [Azure CLI](#tab/azure-cli)
173
+
174
+
Adding additional TCP ports can be done through the CLI by referencing a YAML file with your TCP port configurations.
175
+
176
+
```azurecli
177
+
az containerapp update
178
+
--name <app-name> \
179
+
--resource-group <resource-group> \
180
+
--yaml <your-yaml-file>
181
+
```
182
+
183
+
The following is an example YAML file you can reference in the above CLI command. The configuration for the additional TCP ports is under `additionalPortMappings`.
184
+
185
+
```yml
186
+
location: northcentralus
187
+
name: multiport-example
188
+
properties:
189
+
configuration:
190
+
activeRevisionsMode: Single
191
+
ingress:
192
+
additionalPortMappings:
193
+
- exposedPort: 21025
194
+
external: true
195
+
targetPort: 1025
196
+
allowInsecure: false
197
+
external: true
198
+
targetPort: 1080
199
+
traffic:
200
+
- latestRevision: true
201
+
weight: 100
202
+
transport: http
203
+
managedEnvironmentId: <env id>
204
+
template:
205
+
containers:
206
+
- image: maildev/maildev
207
+
name: maildev
208
+
resources:
209
+
cpu: 0.25
210
+
memory: 0.5Gi
211
+
scale:
212
+
maxReplicas: 1
213
+
minReplicas: 1
214
+
workloadProfileName: Consumption
215
+
type: Microsoft.App/containerApps
216
+
```
217
+
218
+
::: zone-end
219
+
220
+
::: zone pivot="azure-portal"
221
+
222
+
# [Portal](#tab/portal)
223
+
224
+
This feature is not supported in the Azure portal.
225
+
226
+
::: zone-end
227
+
228
+
::: zone pivot="azure-resource-manager"
229
+
230
+
# [ARM template](#tab/arm-template)
231
+
232
+
The following ARM template provides an example of how you can add additional ports to your container apps. Each additional port should be added under `additionalPortMappings` within the `ingress` section for `configuration` within `properties` for the container app. The following is an example:
Copy file name to clipboardExpand all lines: articles/container-apps/ingress-overview.md
+16-2Lines changed: 16 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,7 @@ HTTP ingress adds headers to pass metadata about the client request to your cont
64
64
|`X-Forwarded-Proto`| Protocol used by the client to connect with the Container Apps service. |`http` or `https`|
65
65
|`X-Forwarded-For`| The IP address of the client that sent the request. ||
66
66
|`X-Forwarded-Host`| The host name the client used to connect with the Container Apps service. ||
67
-
|`X-Forwarded-Client-Cert`| The client certificate if `clientCertificateMode` is set. | Semicolon seperated list of Hash, Cert, and Chain. For example: `Hash=....;Cert="...";Chain="...";`|
67
+
|`X-Forwarded-Client-Cert`| The client certificate if `clientCertificateMode` is set. | Semicolon separated list of Hash, Cert, and Chain. For example: `Hash=....;Cert="...";Chain="...";`|
68
68
69
69
### <aname="tcp"></a>TCP
70
70
@@ -78,11 +78,25 @@ With TCP ingress enabled, your container app:
78
78
- Is accessible to other container apps in the same environment via its name (defined by the `name` property in the Container Apps resource) and exposed port number.
79
79
- Is accessible externally via its fully qualified domain name (FQDN) and exposed port number if the ingress is set to "external".
In addition to the main HTTP/TCP port for your container apps, you may expose additional TCP ports to enable applications that accept TCP connections on multiple ports. This feature is in preview.
84
+
85
+
The following apply to additional TCP ports:
86
+
- Additional TCP ports can only be external if the app itself is set as external and the container app is using a custom VNet.
87
+
- Any externally exposed additional TCP ports must be unique across the entire Container Apps environment. This includes all external additional TCP ports, external main TCP ports, and 80/443 ports used by built-in HTTP ingress. If the additional ports are internal, the same port can be shared by multiple apps.
88
+
- If an exposed port is not provided, the exposed port will default to match the target port.
89
+
- Each target port must be unique, and the same target port cannot be exposed on different exposed ports.
90
+
- There is a maximum of 5 additional ports per app. If additional ports are required, please open a support request.
91
+
- Only the main ingress port supports built-in HTTP features such as CORS and session affinity. When running HTTP on top of the additional TCP ports, these built-in features are not supported.
92
+
93
+
Visit the [how to article on ingress](ingress-how-to.md#use-additional-tcp-ports) for more information on how to enable additional ports for your container apps.
94
+
81
95
## Domain names
82
96
83
97
You can access your app in the following ways:
84
98
85
-
- The default fully-qualified domain name (FQDN): Each app in a Container Apps environment is automatically assigned an FQDN based on the environment's DNS suffix. To customize an environment's DNS suffix, see [Custom environment DNS Suffix](environment-custom-dns-suffix.md).
99
+
- The default fullyqualified domain name (FQDN): Each app in a Container Apps environment is automatically assigned an FQDN based on the environment's DNS suffix. To customize an environment's DNS suffix, see [Custom environment DNS Suffix](environment-custom-dns-suffix.md).
86
100
- A custom domain name: You can configure a custom DNS domain for your Container Apps environment. For more information, see [Custom domain names and certificates](./custom-domains-certificates.md).
87
101
- The app name: You can use the app name for communication between apps in the same environment.
0 commit comments