Last modified November 27, 2024

Installing kubectl-gs

kubectl-gs is the Giant Swarm plug-in for kubectl with the official plug-in name gs.

Install using Krew

The simplest way to manage kubectl plug-ins across platforms is using Krew. If you don’t have Krew installed, check the Krew installation docs on how to get it installed.

To install the kubectl-gs plug-in, execute this command:

kubectl krew install gs

Lastly, let’s check that the plug-in is working as it’s supposed to.

kubectl gs

You should see information regarding the commands available.

To upgrade to the latest version of the plug-in, use this command:

kubectl krew upgrade gs

Install manually (without Krew)

  1. Download the release package by going to the latest kubectl-gs release and selecting the right package for your architecture:

    • Linux and Intel/AMD-based processor – filename ends with linux-amd64.tar.gz
    • Linux and ARM processor – filename ends with linux-arm64.tar.gz
    • macOS and Intel-based processor – filename ends with darwin-amd64.tar.gz
    • macOS and ARM processor (M1, M2, M3, and newer) – filename ends with darwin-arm64.tar.gz
  2. Unpack the downloaded package

    tar xzf kubectl-gs-*.tar.gz
    
  3. Copy the executable into a directory included in your PATH

    sudo cp kubectl-gs-*/kubectl-gs /usr/local/bin/.
    
  1. Download the release package by going to the latest kubectl-gs release and selecting the package filename ending with windows-amd64.zip.

  2. Extract the downloaded ZIP file

  3. Copy kubectl-gs.exe to a location that is included in your %PATH%. For example:

    %USERPROFILE%\AppData\Local\Microsoft\WindowsApps
    
  1. Install the kubectl-gs binary for Linux first. You can use the instructions using Krew shown above, or follow the Linux instructions without Krew.

  2. Run the following command so that kubectl gs login can open your browser:

    sudo ln -s $(which wslview) /usr/local/bin/xdg-open
    

Docker

We offer a Docker image via our public repository. The semantic release version number is used to tag images.

  1. Pull the image

    docker pull gsoci.azurecr.io/giantswarm/kubectl-gs:latest
    
  2. Execute a command

    docker run --rm -ti gsoci.azurecr.io/giantswarm/kubectl-gs:latest help
    

This part of our documentation refers to our vintage product. The content may be not valid anymore for our current product. Please check our new documentation hub for the latest state of our docs.