Skip to content

Commit b34e126

Browse files
Merge pull request #198259 from cebundy/no-pods
[Container Apps] Remove references to pods and update containers article
2 parents 82b8d25 + d362130 commit b34e126

File tree

2 files changed

+88
-41
lines changed

2 files changed

+88
-41
lines changed

articles/container-apps/containers.md

Lines changed: 87 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ services: container-apps
55
author: craigshoemaker
66
ms.service: container-apps
77
ms.topic: conceptual
8-
ms.date: 02/18/2022
8+
ms.date: 05/12/2022
99
ms.author: cshoe
1010
ms.custom: ignite-fall-2021
1111
---
1212

1313
# Containers in Azure Container Apps Preview
1414

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.
1616

1717
:::image type="content" source="media/containers/azure-container-apps-containers.png" alt-text="Azure Container Apps: Containers":::
1818

@@ -21,42 +21,85 @@ Azure Container Apps supports:
2121
- Any Linux-based x86-64 (`linux/amd64`) container image
2222
- Containers from any public or private container registry
2323

24-
Additional features include:
24+
Features include:
2525

26-
- There is no required base container image.
27-
- Changes to the `template` ARM configuration section triggers a new [container app revision](application-lifecycle-management.md).
26+
- There's no required base container image.
27+
- Changes to the `template` ARM configuration section trigger a new [container app revision](application-lifecycle-management.md).
2828
- If a container crashes, it automatically restarts.
2929

3030
> [!NOTE]
3131
> The only supported protocols for a container app's fully qualified domain name (FQDN) are HTTP and HTTPS through ports 80 and 443 respectively.
3232
3333
## Configuration
3434

35-
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.
3636

3737
```json
38-
{
39-
...
40-
"template": {
41-
"containers": [
38+
"containers": [
39+
{
40+
"name": "main",
41+
"image": "[parameters('container_image')]",
42+
"env": [
4243
{
43-
"image": "myacr.azurecr.io/myrepo/api-service:v1",
44-
"name": "my-container-image",
45-
"command": ["/bin/queue"],
46-
"args": [],
47-
"env": [
48-
{
49-
"name": "HTTP_PORT",
50-
"value": "8080"
51-
}
52-
],
53-
"resources": {
54-
"cpu": 0.75,
55-
"memory": "1.5Gi"
56-
}
57-
}]
44+
"name": "HTTP_PORT",
45+
"value": "80"
46+
},
47+
{
48+
"name": "SECRET_VAL",
49+
"secretRef": "mysecret"
50+
}
51+
],
52+
"resources": {
53+
"cpu": 0.5,
54+
"memory": "1Gi"
55+
},
56+
"volumeMounts": [
57+
{
58+
"mountPath": "/myfiles",
59+
"volumeName": "azure-files-volume"
60+
}
61+
]
62+
"probes":[
63+
{
64+
"type":"liveness",
65+
"httpGet":{
66+
"path":"/health",
67+
"port":8080,
68+
"httpHeaders":[
69+
{
70+
"name":"Custom-Header",
71+
"value":"liveness probe"
72+
}]
73+
},
74+
"initialDelaySeconds":7,
75+
"periodSeconds":3
76+
},
77+
{
78+
"type":"readiness",
79+
"tcpSocket":
80+
{
81+
"port": 8081
82+
},
83+
"initialDelaySeconds": 10,
84+
"periodSeconds": 3
85+
},
86+
{
87+
"type": "startup",
88+
"httpGet": {
89+
"path": "/startup",
90+
"port": 8080,
91+
"httpHeaders": [
92+
{
93+
"name": "Custom-Header",
94+
"value": "startup probe"
95+
}]
96+
},
97+
"initialDelaySeconds": 3,
98+
"periodSeconds": 3
99+
}]
58100
}
59-
}
101+
],
102+
60103
```
61104

62105
| Setting | Description | Remarks |
@@ -68,8 +111,11 @@ The following example configuration shows the options available when setting up
68111
| `env` | An array of key/value pairs that define environment variables. | Use `secretRef` instead of the `value` field to refer to a secret. |
69112
| `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. |
70113
| `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. |
114+
| `volumeMounts` | An array of volume mount definitions. | You can define a temporary volume or multiple permanent storage volumes for your container. For more information about storage volumes, see [Use storage mounts in Azure Container Apps](storage-mounts.md).|
115+
| `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).|
116+
71117

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.
118+
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.
73119

74120
| vCPUs (cores) | Memory |
75121
|---|---|
@@ -82,43 +128,43 @@ The total amount of CPUs and memory requested for all the containers in a contai
82128
| `1.75` | `3.5Gi` |
83129
| `2.0` | `4.0Gi` |
84130

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.
131+
- The total of the CPU requests in all of your containers must match one of the values in the vCPUs column.
132+
- 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.
87133

88134
## Multiple containers
89135

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).
136+
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).
91137

92-
You run multiple containers together by defining more than one container in the configuration's `containers` array.
138+
To run multiple containers in a container app, add more than one container in the `containers` array of the container app template.
93139

94-
Reasons to run containers together in a pod include:
140+
Reasons to run containers together in a container app include:
95141

96142
- Use a container as a sidecar to your primary app.
97-
- Use of a shared disk space and virtual network.
143+
- Share disk space and the same virtual network.
98144
- 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.
145+
- Group multiple containers that need to always run together.
146+
- Enable direct communication among containers.
101147

102148
## Container registries
103149

104-
You can deploy images hosted on private registries where credentials are provided through the Container Apps configuration.
150+
You can deploy images hosted on private registries by providing credentials in the Container Apps configuration.
105151

106-
To use a container registry, you first define the required fields to the [configuration's](azure-resource-manager-api-spec.md) `registries` section.
152+
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.
107153

108154
```json
109155
{
110156
...
111157
"registries": [{
112158
"server": "docker.io",
113159
"username": "my-registry-user-name",
114-
"passwordSecretRef": "my-password-secretref-name"
160+
"passwordSecretRef": "my-password-secret-name"
115161
}]
116162
}
117163
```
118164

119-
With this set up, the saved credentials can be used when you reference a container image in an `image` in the `containers` array.
165+
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.
120166

121-
The following example shows how to deploy an app from the Azure Container Registry.
167+
The following example shows how to configure Azure Container Registry credentials in a container app.
122168

123169
```json
124170
{
@@ -130,6 +176,7 @@ The following example shows how to deploy an app from the Azure Container Regist
130176
"value": "my-acr-password"
131177
}
132178
],
179+
...
133180
"registries": [
134181
{
135182
"server": "myacr.azurecr.io",

articles/container-apps/microservices.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ ms.custom: ignite-fall-2021
2020

2121
:::image type="content" source="media/microservices/azure-container-services-microservices.png" alt-text="Container apps are deployed as microservices.":::
2222

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).
2424

2525
## Dapr integration
2626

0 commit comments

Comments
 (0)