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-instances/container-instances-update.md
+24-18Lines changed: 24 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,21 +2,30 @@
2
2
title: Update container group
3
3
description: Learn how to update running containers in your Azure Container Instances container groups.
4
4
ms.topic: article
5
-
ms.date: 09/03/2019
5
+
ms.date: 04/17/2020
6
6
---
7
7
8
8
# Update containers in Azure Container Instances
9
9
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.
11
13
12
14
> [!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).
14
16
15
17
## Update a container group
16
18
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.
18
24
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
20
29
21
30
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.
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:
32
41
33
42
```azurecli-interactive
34
43
# 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
44
53
45
54
## Limitations
46
55
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.
54
60
55
61
## Properties that require container delete
56
62
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.
58
64
59
-
These properties require container group deletion prior to redeployment:
65
+
Changes to these properties require container group deletion prior to redeployment:
60
66
61
67
* OS type
62
-
* CPU
63
-
* Memory
68
+
* CPU, memory, or GPU resources
64
69
* Restart policy
65
-
*Ports
70
+
*Network profile
66
71
67
72
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.
68
73
@@ -81,3 +86,4 @@ Mentioned several times in this article is the **container group**. Every contai
0 commit comments