How to retrieve 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 users and administrators may want to retrieve existing information within their organization’s management cluster.
Cluster Retrieval Guide
Frontier users and administrators may want to see current active clusters found within the organization’s management cluster. This guide will cover a step-by-step tutorial on how the user can view these clusters.
Navigate to Cluster Retrieval Options
To being viewing information on clusters, we will start off by navigating to this feature. When you run
frontier, you should see a list of capabilites using Frontier-CLI.
You can see all the actions you are able to perform within your Frontier-CLI menu options. We will run
frontier get to see the information retrieval options within the interface.
You are able to retrieve information on projects, clusters, and machines using the
get action. We can use
-h flag to bring up the help menu. To see the help menu for options on how you would like to view existing clusters, run the following command below:
frontier get cluster -h
Retrieve the List of All Clusters
When you ran the help command earlier for getting clusters, you will find a shortcut labeled
all, which retrieves a list of all known clusters across all projects within the management cluster. Using the shortcut, we can run the following comand below to get all clusters:
frontier get cluster all
Retrieve the List of Clusters By Project
An optional flag is available when retrieving the list of clusters. The
-n flag can be utilized to filter the list of clusters under a certain project. Using the
all shortcut and project flag, we can run the following comand below to get all clusters within a specified project:
frontier get cluster all -n <project-name>
Retrieve the List of Clusters By Provider
Another optional flag is available when retrieving the list of clusters. The
--provider flag can be utilized to filter the list of clusters by a certain provider. Using the
all shortcut and provider flag, we can run the following comand below to get all clusters with the specified provider:
frontier get cluster all -n <provider-name>
Retrieve Detailed Information on a Specific Cluster
Frontier clients are capable of receiving additional information on a specific cluster of their choice. To see these details, we will use the actual cluster name instead of the
frontier get cluster <cluster-name> -n <project-name>
As an example, we will utilize the cluster
frontier-xtreme-cluster-test from the
frontier-test project. To retrieve all details from this cluster, we will run the command:
frontier get cluster frontier-xtreme-cluster-test -n frontier-test