Last modified March 2, 2022

Migrating from gsctl to kubectl-gs

gsctl is a CLI for Giant Swarm’s proprietary REST API, which is no longer developed. To make full use of clusters and apps with Giant Swarm, users have to migrate to the Management API.

Since the Management API is the Kubernetes API of the management cluster, kubectl is available as a CLI to work with the API. In addition, Giant Swarm provides kubectl-gs, which can be run as plugin for kubectl with the shorthand gs.

Some, but not all, gsctl commands have direct equivalents in kubectl-gs.

Here is a table for all replacements:

gsctl commandkubectl gs command
gsctl create clusterkubectl gs template cluster
gsctl create keypairkubectl gs login
gsctl create kubeconfigkubectl gs login
gsctl create nodepoolkubectl gs template nodepool
gsctl list clusterskubectl gs get clusters
gsctl list nodepoolskubectl gs get nodepools
gsctl list releaseskubectl gs get releases
gsctl loginkubectl gs login
gsctl show clusterkubectl gs get clusters
gsctl show nodepoolkubectl gs get nodepools
gsctl show releasekubectl gs get releases

Below is some additional information on commands that don’t have a direct replacement.

gsctl commandComment
gsctl completionkubectl-gs does not yet provide support for shell completion.
gsctl delete clusterTo delete a cluster, use kubectl delete on the cluster’s resources.
gsctl delete nodepoolTo delete a node pool, use kubectl delete on the node pool’s resources.
gsctl delete endpointHandling of context, cluster, and user entries is done via kubectl config subcommands
gsctl infoUse kubectl config current-context and kubectl cluster-info.
gsctl list endpointsUse kubectl get-contexts.
gsctl logoutThere is no logout command for kubectl.
gsctl pingUse e. g. kubectl cluster-info to test your Kubernetes API connection.
gsctl scale clusterThe Management API only supports clusters with node pools. Scaling clusters without node pools is not supported via the Management API.
gsctl select endpointUse kubectl config use-context.
gsctl update clusterUse kuebctl edit or kubectl patch.
gsctl update organizationUse kubectl patch or kubectl edit to modify the organizations.security.giantswarm.io resource.
gsctl upgrade clusterUse kubectl patch to modify the release.giantswarm.io/version label of the cluster’s main resource (clusters.cluster.x-k8s.io).