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/aks/manage-abort-operations.md
+32-17Lines changed: 32 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
---
2
-
title: Abort an Azure Kubernetes Service (AKS) longrunning operation
2
+
title: Abort an AKS long-running operation
3
3
description: Learn how to terminate a long running operation on an Azure Kubernetes Service cluster at the node pool or cluster level.
4
4
ms.topic: article
5
-
ms.date: 3/23/2023
5
+
ms.date: 06/12/2024
6
6
author: tamram
7
7
ms.author: tamram
8
8
@@ -14,43 +14,52 @@ ms.subservice: aks-nodes
14
14
Sometimes deployment or other processes running within pods on nodes in a cluster can run for periods of time longer than expected due to various reasons. You can get insight into the progress of any ongoing operation, such as create, upgrade, and scale, using any preview API version after `2024-01-02-preview` using the following az rest command:
15
15
16
16
```azurecli-interactive
17
-
export ResourceID="You cluster ResourceID"
17
+
export ResourceID="<cluster-resource-id>"
18
18
az rest --method get --url "https://management.azure.com$ResourceID/operations/latest?api-version=2024-01-02-preview"
19
19
```
20
20
21
21
This command provides you with a percentage that indicates how close the operation is to completion. You can use this method to get these insights for up to 50 of the latest operations on your cluster. The "percentComplete" attribute denotes the extent of completion for the ongoing operation, as shown in the following example:
You can also run this command using the operation-id available from the above output. The `Id` parameter denotes the operation-id to use example:
55
+
56
+
You can also run this command using the operation ID available from the above output. The `Id` parameter denotes the operation ID to use. For example:
51
57
52
58
```azurecli-interactive
53
-
az aks operation show --resource-group myResourceGroup --name myCluster --operation-id "94e04d66-5b57-4c2b-bf3e-e026f1067dd1"
59
+
az aks operation show \
60
+
--resource-group myResourceGroup \
61
+
--name myCluster \
62
+
--operation-id "<operation-id>"
54
63
```
55
64
56
65
While it's important to allow operations to gracefully terminate when they're no longer needed, there are circumstances where you need to release control of node pools and clusters with long running operations using an *abort* command.
@@ -74,14 +83,20 @@ The abort operation supports the following scenarios:
74
83
You can use the [az aks nodepool](/cli/azure/aks/nodepool) command with the `operation-abort` argument to abort an operation on a node pool or a managed cluster.
75
84
76
85
The following example terminates an operation on a node pool on a specified cluster.
86
+
77
87
```azurecli-interactive
78
-
az aks nodepool operation-abort --resource-group myResourceGroup --cluster-name myAKSCluster --name myNodePool
88
+
az aks nodepool operation-abort \
89
+
--resource-group myResourceGroup \
90
+
--cluster-name myAKSCluster \
91
+
--name myNodePool
79
92
```
80
93
81
94
The following example terminates an operation on a specified cluster.
82
95
83
96
```azurecli-interactive
84
-
az aks operation-abort --name myAKSCluster --resource-group myResourceGroup
97
+
az aks operation-abort \
98
+
--name myAKSCluster \
99
+
--resource-group myResourceGroup
85
100
```
86
101
87
102
In the response, an HTTP status code of 204 is returned.
0 commit comments