Learn KOP - Deprovision AKS Cluster - Rafay Product Documentation
Part 5: Deprovision
What Will You Do
In part 5, you will:
- Deprovision the AKS cluster and all associated infrastructure in Azure
Watch a video of this exercise.
Deprovision AKS Cluster: Getting Started with Rafay Terraform Provider for AKS - YouTube
Assumptions
This part assumes that you have completed Part 1 of this series and have a successfully provisioned and healthy AKS cluster.
Step 1: Deprovision Cluster
In this step, we will deprovision the AKS cluster through the web console. The controller will cleanup all cluster components in your Azure account.
Go to Infrastructure -> Clusters.
Click on the settings icon of the cluster and select "Delete"
When prompted, select "yes" to confirm the deletion of the cluster
The cluster provision status will show "INFRA DELETION IN PROGRESS". Note, it can take approximately 20 minutes for the deletion to finish
Once the deletion is complete, the cluster will be removed from the web console
Step 1: Deprovision Cluster with RCTL CLI
In this step, we will deprovision the AKS cluster with the RCTL CLI. The controller will cleanup all cluster components in your Azure account.
- Execute the following command to begin deprovisioning the cluster. Note, update the cluster-name in the below command with the name of your cluster.
./rctl delete cluster <cluster-name>
The cluster provision status will show "INFRA DELETION IN PROGRESS". Note, it can take approximately 20 minutes for the deletion to finish
Once the deletion is complete, the cluster will be removed from the web console
Step 1: Deprovision Cluster with Terraform
In this step, we will deprovision the AKS cluster with a Terraform command. The controller will cleanup all cluster components in your Azure account.
- Execute the following command to begin deprovisioning the cluster.
terraform destroy
Enter
yeswhen prompted.The cluster provision status will show "INFRA DELETION IN PROGRESS". Note, it can take approximately 10 minutes for the deletion to finish.
Once the deletion is complete, the cluster will be removed from the web console
Recap
Congratulations! At this point, you have successfully deprovisioned the AKS cluster and all associated infrastructure components in your Azure account.