Delete Clusters

How to delete clusters using Frontier CLI

To perform tasks within the frontier CLI application, you are required to authenticate using your organization’s OIDC provider. Refer to the Authentication using Frontier CLI guide if you need assistance on logging in for use of Frontier services.

Frontier administrators may want to delete existing objects within their organization’s management cluster.

Cluster Deletion Guide

Frontier administators may want to delete any existing clusters that are no longer needed among projects within the organization. Deleting clusters within your Frontier management cluster’s projects is designed to be simple, but users and administrator must have the authorized permissions to perform the action. If you are having thoughts on deleting any clusters, run the following command below to see the list of clusters that may no longer be needed within your management cluster:

frontier get clusters all

Deleted a Specific Cluster

To being delete a specifc cluster, we will start off by navigating to this feature. When you run frontier, you should see a list of capabilites using Frontier-CLI.

Frontier CLI Main Menu

You can see all the actions you are able to perform within your Frontier-CLI menu options. We will run frontier delete to see the deleting options within the interface. The only roles who will have access to view the create menu are cluster administrators and above.

Frontier CLI Delete Menu

Cluster, project, and frontier administrators are able to delete clusters using the delete actions. We can use -h flag to bring up the help menu. To see the help menu for deleting clusters, run the following command below:

frontier delete cluster -h

Expected output:

Frontier CLI Delete Cluster Help

NOTE: Cluster Administrators may only being restricted to deleting workload clusters that they have created within the projects that they are assigned to.

Along with the cluster-name, the only thing required flag you will need to fill is the name of the project you wish to delete the cluster from using project-name or n. For this example, we will delete the cluster azure-frontier-k3s from the cluster creation tutorial guide. The project this cluster resides is named frontier-test.

frontier delete cluster azure-frontier-k3s -n frontier-test

Expected output:

Frontier CLI Delete Cluster Output Example

You will see a response saying your cluster has been deleted from your management cluster’s project. If you are unable to delete the desired cluster, it may be that you do not possess permissions to delete clusters from within that project. Contact your supervisor for any questions or issues on cluster deletion.