Skip to content

Commit

Permalink
Merge pull request #530 from MicrosoftDocs/main
Browse files Browse the repository at this point in the history
11/11/2024 PM Publish
  • Loading branch information
Taojunshen authored Nov 11, 2024
2 parents 1e829cd + 27f36b6 commit 5139bf0
Show file tree
Hide file tree
Showing 9 changed files with 453 additions and 67 deletions.
2 changes: 2 additions & 0 deletions articles/aks/TOC.yml
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,8 @@
href: aks-zone-resiliency.md
- name: Propagate Kubernetes resources across multiple clusters
href: /azure/kubernetes-fleet/resource-propagation?toc=/azure/aks/toc.json&bc=/azure/aks/breadcrumb/toc.json
- name: Deploy SpinKube to run serverless Wasm workloads
href: deploy-spinkube.md
- name: Cluster management
items:
- name: Azure portal Kubernetes resource view
Expand Down
20 changes: 3 additions & 17 deletions articles/aks/delete-node-pool.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ When you delete a node pool, the following resources are deleted:
> Keep the following information in mind when deleting a node pool:
>
> * **You can't recover a node pool after it's deleted**. You need to create a new node pool and redeploy your applications.
> * When you delete a node pool, AKS doesn't perform cordon and drain. To minimize the disruption of rescheduling pods currently running on the node pool you plan to delete, perform a cordon and drain on all nodes in the node pool before deleting. You can learn more about how to cordon and drain using the example scenario provided in the [resizing node pools][resize-node-pool] tutorial.
### [Azure CLI](#tab/azure-cli)

Expand All @@ -46,7 +45,6 @@ $params = @{
ResourceGroupName = '<resource-group-name>'
ClusterName = '<cluster-name>'
Name = '<node-pool-name>'
Force = $true
}
Remove-AzAksNodePool @params
```
Expand All @@ -59,27 +57,15 @@ To delete a node pool in Azure portal, navigate to the **Settings > Node pools**

To verify that the node pool was deleted successfully, use the `kubectl get nodes` command to confirm that the nodes in the node pool no longer exist.

## Ignore PodDisruptionBudgets (PDBs) when removing an existing node pool (Preview)
## Ignore PodDisruptionBudgets (PDBs) when removing an existing node pool

If your cluster has PodDisruptionBudgets that are preventing the deletion of the node pool, you can ignore the PodDisruptionBudget requirements by setting `--ignore-pod-disruption-budget` to `true`. To learn more about PodDisruptionBudgets, see:

* [Plan for availability using a pod disruption budget][pod-disruption-budget]
* [Specifying a Disruption Budget for your Application][specify-disruption-budget]
* [Disruptions][disruptions]

[!INCLUDE [preview features callout](~/reusable-content/ce-skilling/azure/includes/aks/includes/preview/preview-callout.md)]

1. Register or update the `aks-preview` extension using the [`az extension add`][az-extension-add] or [`az extension update`][az-extension-update] command.

```azurecli-interactive
# Register the aks-preview extension
az extension add --name aks-preview
# Update the aks-preview extension
az extension update --name aks-preview
```

2. Delete an existing node pool without following any PodDisruptionBudgets set on the cluster using the [`az aks nodepool delete`][az-aks-delete-nodepool] command with the `--ignore-pod-disruption-budget` flag set to `true`:
1. Delete an existing node pool without following any PodDisruptionBudgets set on the cluster using the [`az aks nodepool delete`][az-aks-delete-nodepool] command with the `--ignore-pod-disruption-budget` flag set to `true`:

```azurecli-interactive
az aks nodepool delete \
Expand All @@ -89,7 +75,7 @@ If your cluster has PodDisruptionBudgets that are preventing the deletion of the
--ignore-pod-disruption-budget true
```

3. To verify that the node pool was deleted successfully, use the `kubectl get nodes` command to confirm that the nodes in the node pool no longer exist.
1. To verify that the node pool was deleted successfully, use the `kubectl get nodes` command to confirm that the nodes in the node pool no longer exist.

## Next steps

Expand Down
Loading

0 comments on commit 5139bf0

Please sign in to comment.