Last modified October 2, 2020

kubectl gs login

We assume that you have the alias kgs set up for the command kubectl gs.

This command allows to ensure an authenticated kubectl context is selected.


The command is called with the general syntax

kubectl gs login [argument]

where argument can be either:

  • Empty: If the current kubectl context is a Giant Swarm control plane, this ensures that the OIDC auth token will be refreshed and show the name of the current context.

  • Web interface URL: The URL of the control plane’s web UI instance.

  • Control plane Kubernetes API endpoint: The URL of the control plane’s Kubernetes API endpoint.

  • Context name: Name of a Giant Swarm control plane kubectl context, with or without gs- prefix.


Using the Web URL as an argument:

kubectl gs login