Skip to content

Instantly share code, notes, and snippets.

@rgpower
Created April 29, 2022 15:30
Show Gist options
  • Save rgpower/11542e650c3f60762d4660c540532fdb to your computer and use it in GitHub Desktop.
Save rgpower/11542e650c3f60762d4660c540532fdb to your computer and use it in GitHub Desktop.
Clear node taints from AKS node pool
#!/usr/bin/env bash
set -euo pipefail
RG=$1
AKS=$2
POOL=$3
SUB=$(az account show -o tsv --query id)
az rest \
--uri "https://management.azure.com/subscriptions/${SUB}/resourceGroups/${RG}/providers/Microsoft.ContainerService/managedClusters/${AKS}/agentPools/${POOL}?api-version=2022-02-01" \
--headers='{"Content-Type":"application/json"}' \
--body '{"properties":{"nodeTaints":[]}}' \
--method put
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment