Last modified September 29, 2021
gsctl select endpoint
gsctl and the REST API are being phased out. We don't have an end-of-life date yet. However, we recommend to familiarize yourself with our Management API and the kubectl gs plugin as a future-proof replacement.
gsctl select endpoint command selects a Giant Swarm REST API endpoint for
usage in subsequent command executions. This defines which endpoint you use,
unless an endpoint is specified on a per-command basis using the
This is relevant to you only if you use several installations, e. g. one on-premises and one in the cloud.
The command works basically as a switch between several available endpoints
that are maintained in your local gsctl configuration file. An endpoint is
added to your configuration whenever you use the
command with a new endpoint URL.
gsctl select endpoint
helps you switch between several endpoints while staying logged in.
gsctl list endpoints and
gsctl info/) give
you more information on status and which endpoints are available.
Which endpoint is used is defined in this order:
- The endpoint given via command line flag
--endpointis used if given.
- Otherwise, if given, the endpoint defined via the environment variable
- Otherwise the endpoint via
gsctl select endpointor
gsctl loginis used.
To simplify the selection of an endpoint, each endpoint URL can have an alias.
When adding a new endpoint to your configuration by the use of
gsctl login, an alias for the endpoint is automatically set to
the unique name of the according Giant Swarm installation.
Aliases can be edited manually by editing your gsctl configuration file. We strongly recommend to use the same aliases throughout a team, as that simplifies communication. Also note that aliases must be unique within your configuration.
Note: Endpoint aliases have been added in gsctl version 0.10.0. Endpoints
added to your configuration by previous version don’t have an alias set. A
simple way to add the default alias is to open your gsctl configuraiton in an
editor, then remove the endpoint entry without an alias, then use
to log in with that endpoint URL again.
gsctl select endpoint <endpoint>
gsctl select endpoint https://api.g8s.example.eu-central-1.aws.gigantic.io
A message will be printed letting you know if the endpoint has been selected.
With the alias
myalias set for this endpoint, you could alternatively execute
gsctl select endpoint myalias