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
Copy file name to clipboardExpand all lines: articles/container-apps/workload-profiles-manage-cli.md
+72-15Lines changed: 72 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,12 +5,15 @@ services: container-apps
5
5
author: craigshoemaker
6
6
ms.service: container-apps
7
7
ms.topic: how-to
8
-
ms.date: 04/10/2023
8
+
ms.date: 04/11/2023
9
9
ms.author: cshoe
10
+
zone_pivot_groups: container-apps-vnet-types
10
11
---
11
12
12
13
# Manage workload profiles in a Consumption + Dedicated workload profiles plan structure (preview)
13
14
15
+
Learn to manage a Container Apps environment with workload profile support.
16
+
14
17
## Supported regions
15
18
16
19
The following regions support workload profiles during preview:
@@ -24,17 +27,35 @@ The following regions support workload profiles during preview:
24
27
25
28
## Create a container app in a profile
26
29
27
-
At a high level, when you create a container app into a workload profile, you go through the following steps:
30
+
::: zone pivot="aca-vnet-managed"
31
+
32
+
Azure Container Apps run in an environment, which uses a virtual network (VNet). By default, your Container App environment is created with a managed VNet that is automatically generated for you. Generated VNets are inaccessible to you as they're created in Microsoft's tenant.
33
+
34
+
Create a container apps environment with a [custom VNet](./workload-profiles-manage-cli.md?pivots=aca-vnet-custom) if you need any of the following features:
35
+
36
+
-[User defined routes](user-defined-routes.md)
37
+
- Integration with Application Gateway
38
+
- Network Security Groups
39
+
- Communicating with resources behind private endpoints in your virtual network
40
+
41
+
::: zone-end
28
42
29
-
- Select a workload profile
30
-
- Create or provide a VNet
31
-
- Create a subnet with a `Microsoft.App/environments` delegation
32
-
- Create a new environment
33
-
- Create a container app associated with the workload profile in the environment
43
+
::: zone pivot="aca-vnet-custom"
34
44
35
-
Use the following commands to create an environment with a workload profile.
45
+
When you create an environment with a custom VNet, you have full control over the VNet configuration. This amount of control gives you the option to implement the following features:
36
46
37
-
1. Create a VNet
47
+
-[User defined routes](user-defined-routes.md)
48
+
- Integration with Application Gateway
49
+
- Network Security Groups
50
+
- Communicating with resources behind private endpoints in your virtual network
51
+
52
+
::: zone-end
53
+
54
+
Use the following commands to create an environment with workload profile support.
55
+
56
+
::: zone pivot="aca-vnet-custom"
57
+
58
+
1. Create a VNet.
38
59
39
60
```bash
40
61
az network vnet create \
@@ -44,7 +65,7 @@ Use the following commands to create an environment with a workload profile.
44
65
--name "<VNET_NAME>"
45
66
```
46
67
47
-
1. Create a subnet
68
+
1. Create a subnet delegated to `Microsoft.App/environments`.
48
69
49
70
```bash
50
71
az network vnet subnet create \
@@ -58,6 +79,8 @@ Use the following commands to create an environment with a workload profile.
58
79
59
80
Copy the ID value and paste into the next command.
60
81
82
+
The `Microsoft.App/environments` delegation is required to give the Container Apps runtime the needed control over your VNet to run workload profiles in the Container Apps environment.
83
+
61
84
You can specify as small as a `/27` CIDR (32 IPs-8 reserved) for the subnet. Some things to consider if you're going to specify a `/27` CIDR:
62
85
63
86
- There are 11 IP addresses reserved for Container Apps infrastructure. Therefore, a `/27` CIDR has a maximum of 21 IP available addresses.
@@ -68,10 +91,14 @@ Use the following commands to create an environment with a workload profile.
68
91
|---|---|
69
92
| Every replica requires one IP. Users can't have apps with more than 21 replicas across all apps. Zero downtime deployment requires double the IPs since the old revision is running until the new revision is successfully deployed. | Every instance (VM node) requires a single IP. You can have up to 21 instances across all workload profiles, and hundreds or more replicas running on these workload profiles. |
70
93
94
+
::: zone-end
95
+
71
96
1. Create *Consumption + Dedicated* environment with workload profile support
72
97
98
+
::: zone pivot="aca-vnet-custom"
99
+
73
100
>[!Note]
74
-
> In Container Apps, you can configure whether your Container Apps will allow public ingress or only ingress from within your VNet at the environment level. In order to restrict ingress to just your VNet, you will need to set the `--internal-only` flag.
101
+
> In Container Apps, you can configure whether your Container Apps will allow public ingress or only ingress from within your VNet at the environment level. In order to restrict ingress to just your VNet, you need to set the `--internal-only` flag.
75
102
76
103
# [External environment](#tab/external-env)
77
104
@@ -80,8 +107,7 @@ Use the following commands to create an environment with a workload profile.
80
107
--enable-workload-profiles \
81
108
--resource-group "<RESOURCE_GROUP>" \
82
109
--name "<NAME>" \
83
-
--location "<LOCATION>" \
84
-
--infrastructure-subnet-resource-id "<SUBNET_ID>"
110
+
--location "<LOCATION>"
85
111
```
86
112
87
113
# [Internal environment](#tab/internal-env)
@@ -92,12 +118,26 @@ Use the following commands to create an environment with a workload profile.
This command can take up to 10 minutes to complete.
102
142
103
143
1. Check status of environment. Here, you're looking to see if the environment is created successfully.
@@ -112,6 +152,8 @@ Use the following commands to create an environment with a workload profile.
112
152
113
153
1. Create a new container app.
114
154
155
+
# [External environment](#tab/external-env)
156
+
115
157
```azurecli
116
158
az containerapp create \
117
159
--resource-group "<RESOURCE_GROUP>" \
@@ -123,7 +165,22 @@ Use the following commands to create an environment with a workload profile.
123
165
--workload-profile-name "Consumption"
124
166
```
125
167
126
-
This command deploys the application to the built in Consumption workload profile. If you want to create an app in a dedicated workload profile, you first need to [add the profile to the environment](#add-profiles).
This command deploys the application to the built-in Consumption workload profile. If you want to create an app in a dedicated workload profile, you first need to [add the profile to the environment](#add-profiles).
127
184
128
185
This command creates the new application in the environment using a specific workload profile.
0 commit comments