Deleting GKE Cluster and Unused Resources
In this lesson, we will go over the method to delete a GKE cluster and free up unused resources.
Please use the instructions that follow to delete your GKE cluster if it’s dedicated exclusively to the exercises from this course and if you’re not planning to jump into the next chapter right away. That way, you won’t be paying for resources you’re not using. The next chapter will provide Gists with instructions on how to recreate the cluster in a matter of minutes.
With the cluster gone, there are still some resources that were not removed. Namely, the disks that are now unused but still exist. We can remove them with the command that follows.
⚠️ You will likely see an error stating that a disk cannot be deleted.
That command listed all disks that do not have a user assigned (not used). The list of those disks is then passed to the disks delete
command that removed them one by one if you confirmed the action.
Next, let’s look at how to delete an EKS cluster and the associated resources.