Skip to content

Commit 4fdaab8

Browse files
authored
Merge pull request #111850 from dlepow/aciupdate
[ACI] Update container group
2 parents 25c0d86 + b1d2a4b commit 4fdaab8

File tree

1 file changed

+24
-18
lines changed

1 file changed

+24
-18
lines changed

articles/container-instances/container-instances-update.md

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,30 @@
22
title: Update container group
33
description: Learn how to update running containers in your Azure Container Instances container groups.
44
ms.topic: article
5-
ms.date: 09/03/2019
5+
ms.date: 04/17/2020
66
---
77

88
# Update containers in Azure Container Instances
99

10-
During normal operation of your container instances, you may find it necessary to update the running containers in a [container group](container-instances-container-groups.md). For example, you might wish to update the image version, change a DNS name, update environment variables, or refresh the state of a container whose application has crashed.
10+
During normal operation of your container instances, you may find it necessary to update the running containers in a [container group](container-instances-container-groups.md). For example, you might wish to update a property such as an image version, a DNS name, or an environment variable, or refresh a property in a container whose application has crashed.
11+
12+
Update the containers in a running container group by redeploying an existing group with at least one modified property. When you update a container group, all running containers in the group are restarted in-place, usually on the same underlying container host.
1113

1214
> [!NOTE]
13-
> Terminated or deleted container groups can't be updated. Once a container group has terminated (is in either a Succeeded or Failed state) or has been deleted, the group must be deployed as new.
15+
> Terminated or deleted container groups can't be updated. Once a container group has terminated (is in either a Succeeded or Failed state) or has been deleted, the group must be deployed as new. See other [limitations](#limitations).
1416
1517
## Update a container group
1618

17-
Update the containers in a running container group by redeploying an existing group with at least one modified property. When you update a container group, all running containers in the group are restarted in-place, usually on the same underlying container host.
19+
To update an existing container group:
20+
21+
* Issue the create command (or use the Azure portal) and specify the name of an existing group
22+
* Modify or add at least one property of the group that supports update when you redeploy. Certain properties [don't support updates](#properties-that-require-container-delete).
23+
* Set other properties with the values you provided previously. If you don't set a value for a property, it reverts to its default value.
1824

19-
Redeploy an existing container group by issuing the create command (or use the Azure portal) and specify the name of an existing group. Modify at least one valid property of the group when you issue the create command to trigger the redeployment, and leave the remaining properties unchanged (or continue to use default values). Not all container group properties are valid for redeployment. See [Properties that require delete](#properties-that-require-container-delete) for a list of unsupported properties.
25+
> [!TIP]
26+
> A [YAML file](/container-instances-container-groups.md#deployment) helps maintain a container group's deployment configuration, and provides a starting point to deploy an updated group. If you used a different method to create the group, you can export the configuration to YAML by using [az container export][az-container-export],
27+
28+
### Example
2029

2130
The following Azure CLI example updates a container group with a new DNS name label. Because the DNS name label property of the group is one that can be updated, the container group is redeployed, and its containers restarted.
2231

@@ -28,7 +37,7 @@ az container create --resource-group myResourceGroup --name mycontainer \
2837
--image nginx:alpine --dns-name-label myapplication-staging
2938
```
3039

31-
Update the container group with a new DNS name label, *myapplication*, and leave the remaining properties unchanged:
40+
Update the container group with a new DNS name label, *myapplication*, and set the remaining properties with the values used previously:
3241

3342
```azurecli-interactive
3443
# Update DNS name label (restarts container), leave other properties unchanged
@@ -44,25 +53,21 @@ Applications based on larger container images like Windows Server Core can see s
4453

4554
## Limitations
4655

47-
Not all properties of a container group support updates. To change some properties of a container group, you must first delete, then redeploy the group. For details, see [Properties that require container delete](#properties-that-require-container-delete).
48-
49-
All containers in a container group are restarted when you update the container group. You can't perform an update or in-place restart of a specific container in a multi-container group.
50-
51-
The IP address of a container won't typically change between updates, but it's not guaranteed to remain the same. As long as the container group is deployed to the same underlying host, the container group retains its IP address. Although rare, and while Azure Container Instances makes every effort to redeploy to the same host, there are some Azure-internal events that can cause redeployment to a different host. To mitigate this issue, always use a DNS name label for your container instances.
52-
53-
Terminated or deleted container groups can't be updated. Once a container group has stopped (is in the *Terminated* state) or has been deleted, the group is deployed as new.
56+
* Not all properties of a container group support updates. To change some properties of a container group, you must first delete, then redeploy the group. See [Properties that require container delete](#properties-that-require-container-delete).
57+
* All containers in a container group are restarted when you update the container group. You can't perform an update or in-place restart of a specific container in a multi-container group.
58+
* The IP address of a container group is typically retained between updates, but isn't guaranteed to remain the same. As long as the container group is deployed to the same underlying host, the container group retains its IP address. Although rare, there are some Azure-internal events that can cause redeployment to a different host. To mitigate this issue, we recommend using a DNS name label for your container instances.
59+
* Terminated or deleted container groups can't be updated. Once a container group is stopped (is in the *Terminated* state) or deleted, the group is deployed as new.
5460

5561
## Properties that require container delete
5662

57-
As mentioned earlier, not all container group properties can be updated. For example, to change the ports or restart policy of a container, you must first delete the container group, then create it again.
63+
Not all container group properties can be updated. For example, to change the restart policy of a container, you must first delete the container group, then create it again.
5864

59-
These properties require container group deletion prior to redeployment:
65+
Changes to these properties require container group deletion prior to redeployment:
6066

6167
* OS type
62-
* CPU
63-
* Memory
68+
* CPU, memory, or GPU resources
6469
* Restart policy
65-
* Ports
70+
* Network profile
6671

6772
When you delete a container group and recreate it, it's not "redeployed," but created new. All image layers are pulled fresh from the registry, not from those cached by a previous deployment. The IP address of the container might also change due to being deployed to a different underlying host.
6873

@@ -81,3 +86,4 @@ Mentioned several times in this article is the **container group**. Every contai
8186
<!-- LINKS - Internal -->
8287
[az-container-create]: /cli/azure/container?view=azure-cli-latest#az-container-create
8388
[azure-cli-install]: /cli/azure/install-azure-cli
89+
[az-container-export]: /cli/azure/container#az-container-export

0 commit comments

Comments
 (0)