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/containers.md
+77-84Lines changed: 77 additions & 84 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,14 +5,14 @@ services: container-apps
5
5
author: craigshoemaker
6
6
ms.service: container-apps
7
7
ms.topic: conceptual
8
-
ms.date: 05/11/2022
8
+
ms.date: 05/12/2022
9
9
ms.author: cshoe
10
10
ms.custom: ignite-fall-2021
11
11
---
12
12
13
13
# Containers in Azure Container Apps Preview
14
14
15
-
Azure Container Apps manages the details of Kubernetes and container orchestrations for you. Containers in Azure Container Apps can use any runtime, programming language, or development stack of your choice.
15
+
Azure Container Apps manages the details of Kubernetes and container orchestration for you. Containers in Azure Container Apps can use any runtime, programming language, or development stack of your choice.
The following example configuration shows the options available when setting up a container.
35
+
Below is an example of the `containers` array in the [`properties.template`](azure-resource-manager-api-spec.md#propertiestemplate) section of a container app resource template. The excerpt shows the available configuration options when setting up a container.
@@ -68,8 +105,10 @@ The following example configuration shows the options available when setting up
68
105
|`env`| An array of key/value pairs that define environment variables. | Use `secretRef` instead of the `value` field to refer to a secret. |
69
106
|`resources.cpu`| The number of CPUs allocated to the container. | Values must adhere to the following rules: the value must be greater than zero and less than or equal to 2, and can be any decimal number, with a maximum of two decimal places. For example, `1.25` is valid, but `1.555` is invalid. The default is 0.5 CPU per container. |
70
107
|`resources.memory`| The amount of RAM allocated to the container. | This value is up to `4Gi`. The only allowed units are [gibibytes](https://simple.wikipedia.org/wiki/Gibibyte) (`Gi`). Values must adhere to the following rules: the value must be greater than zero and less than or equal to `4Gi`, and can be any decimal number, with a maximum of two decimal places. For example, `1.25Gi` is valid, but `1.555Gi` is invalid. The default is `1Gi` per container. |
108
+
|`probes`| An array of health probes enabled in the container. | This feature is based on Kubernetes health probes. For more information about probes settings, see [Health probes in Azure Container Apps](health-probes.md).|
109
+
71
110
72
-
The total amount of CPUs and memory requested for all the containers in a container app must add up to one of the following combinations.
111
+
When allocating resources, the total amount of CPUs and memory requested for all the containers in a container app must add up to one of the following combinations.
73
112
74
113
| vCPUs (cores) | Memory |
75
114
|---|---|
@@ -82,43 +121,43 @@ The total amount of CPUs and memory requested for all the containers in a contai
82
121
|`1.75`|`3.5Gi`|
83
122
|`2.0`|`4.0Gi`|
84
123
85
-
-All of the CPU requests in all of your containers must match one of the values in the vCPUs column.
86
-
-All of the memory requests in all your containers must match the memory value in the memory column in the same row of the CPU column.
124
+
-The total of the CPU requests in all of your containers must match one of the values in the vCPUs column.
125
+
-The total of the memory requests in all your containers must match the memory value in the memory column in the same row of the CPU column.
87
126
88
127
## Multiple containers
89
128
90
-
You can define multiple containers in a single container app. Groups of containers are known as [pods](https://kubernetes.io/docs/concepts/workloads/pods). The containers in a pod share hard disk and network resources and experience the same [application lifecycle](application-lifecycle-management.md).
129
+
You can define multiple containers in a single container app. The containers in a container app share hard disk and network resources and experience the same [application lifecycle](application-lifecycle-management.md).
91
130
92
-
You run multiple containers together by defining more than one container in the configuration's `containers` array.
131
+
To run multiple containers in a container app, add more than one container in the `containers` array of the container app template.
93
132
94
-
Reasons to run containers together in a pod include:
133
+
Reasons to run containers together in a container app include:
95
134
96
135
- Use a container as a sidecar to your primary app.
97
-
-Use of a shared disk space and virtual network.
136
+
-Share disk space and the same virtual network.
98
137
- Share scale rules among containers.
99
-
- Group together multiple containers that need to always run together.
100
-
- Enable direct communication among containers on the same host.
138
+
- Group multiple containers that need to always run together.
139
+
- Enable direct communication among containers.
101
140
102
141
## Container registries
103
142
104
-
You can deploy images hosted on private registries where credentials are provided through the Container Apps configuration.
143
+
You can deploy images hosted on private registries by providing credentials in the Container Apps configuration.
105
144
106
-
To use a container registry, you first define the required fields to the [configuration's](azure-resource-manager-api-spec.md)`registries` section.
145
+
To use a container registry, you define the required fields in `registries` array in the [`properties.configuration`](azure-resource-manager-api-spec.md)section of the container app resource template. The `passwordSecretRef` field identifies the name of the secret in the `secrets` array name where you defined the password.
107
146
108
147
```json
109
148
{
110
149
...
111
150
"registries": [{
112
151
"server": "docker.io",
113
152
"username": "my-registry-user-name",
114
-
"passwordSecretRef": "my-password-secretref-name"
153
+
"passwordSecretRef": "my-password-secret-name"
115
154
}]
116
155
}
117
156
```
118
157
119
-
With this set up, the saved credentials can be used when you reference a container image in an `image` in the `containers` array.
158
+
With the registry information setup, the saved credentials can be used to pull a container image from the private registry when your app is deployed.
120
159
121
-
The following example shows how to deploy an app from the Azure Container Registry.
160
+
The following example shows how to configure Azure Container Registry credentials in a container app.
122
161
123
162
```json
124
163
{
@@ -130,6 +169,7 @@ The following example shows how to deploy an app from the Azure Container Regist
130
169
"value": "my-acr-password"
131
170
}
132
171
],
172
+
...
133
173
"registries": [
134
174
{
135
175
"server": "myacr.azurecr.io",
@@ -141,53 +181,6 @@ The following example shows how to deploy an app from the Azure Container Regist
141
181
}
142
182
```
143
183
144
-
### Managed identity with Azure Container Registry
145
-
146
-
You can use an Azure managed identity to authenticate with Azure Container Registry instead of using a username and password. To use a managed identity, assign a system-assigned or user-assigned managed identity to your container app, then specify the managed identity you want to use for each registry using the managed identity resource ID for user-assigned, or "system" for system-assigned.
147
-
148
-
```json
149
-
{
150
-
"identity": {
151
-
"type": "SystemAssigned,UserAssigned",
152
-
"userAssignedIdentities": {
153
-
"<IDENTITY1_RESOURCE_ID>": {}
154
-
}
155
-
}
156
-
"properties": {
157
-
"configuration": {
158
-
"registries": [
159
-
{
160
-
"server": "myacr1.azurecr.io",
161
-
"identity": "<IDENTITY1_RESOURCE_ID>"
162
-
},
163
-
{
164
-
"server": "myacr2.azurecr.io",
165
-
"identity": "system"
166
-
}]
167
-
}
168
-
...
169
-
}
170
-
}
171
-
```
172
-
173
-
The managed identity must have `AcrPull` access on the Azure Container Registry. For more information about assigning Azure Container Registry permissions to managed identities, see [Authenticate with managed identity](../container-registry/container-registry-authentication-managed-identity).
174
-
175
-
System-assigned identities are created at the time your container app is created, and therefore, won't have `AcrPull` access to your Azure Container Registry. As a result, the image can't be pulled from your private registry when your app is first deployed.
176
-
177
-
To configure a system-assigned identity, you must use one of the following methods.
178
-
179
-
Use a public registry for the initial deployment:
180
-
181
-
1. Create your container app using a public image and a system-assigned identity.
182
-
1. Give the new system-assigned identity `AcrPull` access to your private Azure Container Registry.
183
-
1. Update your container app replacing the public image with the image from your private Azure Container Registry.
184
-
185
-
Restart your app after assigning permissions:
186
-
187
-
1. Create your container app using a private image and a system-assigned identity. (The deployment will result in a failure to pull the image.)
188
-
1. Give the new system-assigned identity `AcrPull` access to your private Azure Container Registry.
189
-
1. Restart your container app revision.
190
-
191
184
## Limitations
192
185
193
186
Azure Container Apps has the following limitations:
Copy file name to clipboardExpand all lines: articles/container-apps/microservices.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ ms.custom: ignite-fall-2021
20
20
21
21
:::image type="content" source="media/microservices/azure-container-services-microservices.png" alt-text="Container apps are deployed as microservices.":::
22
22
23
-
A Container Apps [environment](environment.md) provides a security boundary around a group of container apps. A single container app typically represents a microservice, which is composed of pods made up of one or more [containers](containers.md).
23
+
A Container Apps [environment](environment.md) provides a security boundary around a group of container apps. A single container app typically represents a microservice, which is composed of container apps made up of one or more [containers](containers.md).
0 commit comments