Skip to content

Commit 82d8e00

Browse files
author
Jill Grant
authored
Merge pull request #278073 from tamram/tamram24-0612
remove subscription IDs from manage-abort-operations.md
2 parents ed4692d + fe8d891 commit 82d8e00

File tree

1 file changed

+32
-17
lines changed

1 file changed

+32
-17
lines changed

articles/aks/manage-abort-operations.md

Lines changed: 32 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
title: Abort an Azure Kubernetes Service (AKS) long running operation
2+
title: Abort an AKS long-running operation
33
description: Learn how to terminate a long running operation on an Azure Kubernetes Service cluster at the node pool or cluster level.
44
ms.topic: article
5-
ms.date: 3/23/2023
5+
ms.date: 06/12/2024
66
author: tamram
77
ms.author: tamram
88

@@ -14,43 +14,52 @@ ms.subservice: aks-nodes
1414
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:
1515

1616
```azurecli-interactive
17-
export ResourceID="You cluster ResourceID"
17+
export ResourceID="<cluster-resource-id>"
1818
az rest --method get --url "https://management.azure.com$ResourceID/operations/latest?api-version=2024-01-02-preview"
1919
```
2020

2121
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:
2222

23-
```azurecli-interactive
24-
"id": "/subscriptions/26fe00f8-9173-4872-9134-bb1d2e00343a/resourcegroups/testStatus/providers/Microsoft.ContainerService/managedClusters/contoso/operations/fc10e97d-b7a8-4a54-84de-397c45f322e1",
25-
"name": "fc10e97d-b7a8-4a54-84de-397c45f322e1",
23+
```bash
24+
"id": "/subscriptions/<subscription-id>/resourcegroups/myResourceGroup/providers/Microsoft.ContainerService/managedClusters/contoso/operations/<operation-id>",
25+
"name": "<operation-id>",
2626
"percentComplete": 10,
2727
"startTime": "2024-04-08T18:21:31Z",
2828
"status": "InProgress"
2929
```
3030

31-
There is also a cli command equivalent for the above that shows the status of the most recent operation in the cluster.
31+
There is also a cli command equivalent for the above that shows the status of the most recent operation in the cluster.
32+
3233
```azurecli-interactive
33-
az aks operation show-latest --resource-group myResourceGroup --name myCluster
34+
az aks operation show-latest \
35+
--resource-group myResourceGroup \
36+
--name myCluster
3437
```
35-
The following is an example output -
36-
```azurecli-interactive
38+
39+
The following is an example output:
40+
41+
```bash
3742
{
3843
"endTime": null,
3944
"error": null,
40-
"id": "/subscriptions/3368aba5-673c-452f-96b8-71326a289646/resourcegroups/testkaar/providers/Microsoft.ContainerService/managedClusters/contoso/operations/94e04d66-5b57-4c2b-bf3e-e026f1067dd1",
41-
"name": "94e04d66-5b57-4c2b-bf3e-e026f1067dd1",
45+
"id": "/subscriptions/<subscription-id>/resourcegroups/myResourceGroup/providers/Microsoft.ContainerService/managedClusters/contoso/operations/<operation-id>",
46+
"name": "<operation-id>",
4247
"operations": null,
4348
"percentComplete": 1.0,
44-
"resourceGroup": "testkaar",
49+
"resourceGroup": "myResourceGroup",
4550
"resourceId": null,
4651
"startTime": "2024-06-12T18:16:21+00:00",
4752
"status": "InProgress"
4853
}
4954
```
50-
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:
5157

5258
```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>"
5463
```
5564

5665
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:
7483
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.
7584

7685
The following example terminates an operation on a node pool on a specified cluster.
86+
7787
```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
7992
```
8093

8194
The following example terminates an operation on a specified cluster.
8295

8396
```azurecli-interactive
84-
az aks operation-abort --name myAKSCluster --resource-group myResourceGroup
97+
az aks operation-abort \
98+
--name myAKSCluster \
99+
--resource-group myResourceGroup
85100
```
86101

87102
In the response, an HTTP status code of 204 is returned.

0 commit comments

Comments
 (0)