From 0d18caa35b5c092b7dbe78618092e45ae41bf238 Mon Sep 17 00:00:00 2001 From: "aspire-repo-bot[bot]" <268009190+aspire-repo-bot[bot]@users.noreply.github.com> Date: Fri, 4 Sep 2026 18:13:48 +0000 Subject: [PATCH] docs: add AKS destroy/cleanup section Documents the new destroy-specific AKS credential acquisition from microsoft/aspire#19243, which lets 'aspire destroy' tear down AKS deployments without relying on the caller's ambient kubectl context. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../docs/deployment/kubernetes/aks.mdx | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/frontend/src/content/docs/deployment/kubernetes/aks.mdx b/src/frontend/src/content/docs/deployment/kubernetes/aks.mdx index ad5f28e41..bcdec8dc6 100644 --- a/src/frontend/src/content/docs/deployment/kubernetes/aks.mdx +++ b/src/frontend/src/content/docs/deployment/kubernetes/aks.mdx @@ -506,6 +506,32 @@ aspire publish -o aks-artifacts This generates Helm charts and Bicep infrastructure templates that you can review, customize, and deploy using your own CI/CD pipeline or GitOps workflow. +## Clean up resources + +To tear down a deployed AKS environment, use `aspire destroy`: + +```bash title="Destroy an AKS deployment" +aspire destroy +``` + +`aspire destroy` acquires AKS credentials for the target cluster itself, so it doesn't depend on the cluster already being selected in your ambient `kubectl` context. It uninstalls the main Helm release along with any opted-in external charts and cert-manager resources, then deletes the Azure resource group — including the AKS cluster, ACR, and every other Azure resource that was provisioned. This action cannot be undone. + +```bash title="Non-interactive destroy in CI/CD" +KUBECONFIG="$(mktemp)" aspire destroy \ + --apphost MyApp.AppHost/MyApp.AppHost.csproj \ + --environment my-environment \ + --non-interactive \ + --yes +``` + + + + +See the [`aspire destroy` command reference](/reference/cli/commands/aspire-destroy/) for the full set of options. + + ## Azure-specific considerations ### Authentication