Skip to content

Commit 8b60e9d

Browse files
Merge pull request #278041 from kaarthis/opstatus1
cli add
2 parents 55f51aa + cff138b commit 8b60e9d

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

articles/aks/manage-abort-operations.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,31 @@ This command provides you with a percentage that indicates how close the operati
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.
32+
```azurecli-interactive
33+
az aks operation show-latest --resource-group myResourceGroup --name myCluster
34+
```
35+
The following is an example output -
36+
```azurecli-interactive
37+
{
38+
"endTime": null,
39+
"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",
42+
"operations": null,
43+
"percentComplete": 1.0,
44+
"resourceGroup": "testkaar",
45+
"resourceId": null,
46+
"startTime": "2024-06-12T18:16:21+00:00",
47+
"status": "InProgress"
48+
}
49+
```
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:
51+
52+
```azurecli-interactive
53+
az aks operation show --resource-group myResourceGroup --name myCluster --operation-id "94e04d66-5b57-4c2b-bf3e-e026f1067dd1"
54+
```
55+
3156
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.
3257

3358
AKS support for aborting long running operations is now generally available. This feature allows you to take back control and run another operation seamlessly. This design is supported using the [Azure REST API](/rest/api/azure/) or the [Azure CLI](/cli/azure/).

0 commit comments

Comments
 (0)