Skip to content

Commit 7c34445

Browse files
authored
Merge pull request #17021 from leslielin-5/patch-30
Update delete-cluster-pdb.md
2 parents d7e419d + e07295c commit 7c34445

File tree

1 file changed

+22
-14
lines changed

1 file changed

+22
-14
lines changed

AKS-Arc/delete-cluster-pdb.md

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,39 +19,47 @@ When you delete an AKS Arc cluster that has [PodDisruptionBudget](https://kubern
1919

2020
Before you delete the AKS Arc cluster, access the AKS Arc cluster's **kubeconfig** and delete all PDBs:
2121

22-
1. Access the AKS Arc cluster:
22+
1. Access the AKS Arc cluster according to its connectivity state:
2323

24-
```azurecli
25-
az connectedk8s proxy -n $aks_cluster_name -g $resource_group_name
26-
```
24+
- When the AKS Arc cluster is in a **Connected** state, run the [`az connectedk8s proxy`](/cli/azure/connectedk8s#az-connectedk8s-proxy) command
25+
26+
```azurecli
27+
az connectedk8s proxy -n $aks_cluster_name -g $resource_group_name
28+
```
29+
30+
- When the AKS Arc cluster is in a **disconnected** state, run the [`az aksarc get-credentials`](/cli/azure/aksarc#az-aksarc-get-credentials) command with permission to perform the **Microsoft.HybridContainerService/provisionedClusterInstances/listAdminKubeconfig/action** action, which is included in the **Azure Kubernetes Service Arc Cluster Admin** role permission. For more information, see [Retrieve certificate-based admin kubeconfig in AKS Arc](retrieve-admin-kubeconfig.md#retrieve-the-certificate-based-admin-kubeconfig-using-az-cli).
31+
32+
```azurecli
33+
az aksarc get-credentials -n $aks_cluster_name -g $resource_group_name --admin
34+
```
2735
2836
1. Verify PDB:
2937
3038
```bash
3139
kubectl get pdb -A
3240
```
3341

34-
1. Delete all PDBs. Here's an example of deleting a PDB generated from workload identity enablement:
42+
1. Delete all PDBs. The following command is an example of deleting a PDB generated from workload identity enablement:
3543

36-
```bash
37-
kubectl delete pdb azure-wi-webhook-controller-manager -n arc-workload-identity
38-
```
44+
```bash
45+
kubectl delete pdb azure-wi-webhook-controller-manager -n arc-workload-identity
46+
```
3947

4048
### [AKS on Azure Local](#tab/aks-on-azure-local)
4149

4250
4. Delete the AKS Arc cluster:
4351

44-
```azurecli
45-
az aksarc delete -n $aks_cluster_name -g $resource_group_name
46-
```
52+
```azurecli
53+
az aksarc delete -n $aks_cluster_name -g $resource_group_name
54+
```
4755

4856
### [AKS Edge Essentials](#tab/aks-edge-essentials)
4957

5058
4. Delete the AKS Arc cluster:
5159

52-
```azurecli
53-
az connectedk8s delete -n <cluster_name> -g <resource_group>
54-
```
60+
```azurecli
61+
az connectedk8s delete -n <cluster_name> -g <resource_group>
62+
```
5563

5664
---
5765

0 commit comments

Comments
 (0)