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)
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
- Linux and Intel/AMD-based processor – filename ends with
Unpack the downloaded package
tar xzf kubectl-gs-*.tar.gz
Copy the executable into a directory included in your
PATH
sudo cp kubectl-gs-*/kubectl-gs /usr/local/bin/.
Download the release package by going to the latest kubectl-gs release and selecting the package filename ending with
windows-amd64.zip
.Extract the downloaded ZIP file
Copy
kubectl-gs.exe
to a location that is included in your%PATH%
. For example:%USERPROFILE%\AppData\Local\Microsoft\WindowsApps
Install the kubectl-gs binary for Linux first. You can use the instructions using Krew shown above, or follow the Linux instructions without Krew.
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.
Pull the image
docker pull gsoci.azurecr.io/giantswarm/kubectl-gs:latest
Execute a command
docker run --rm -ti gsoci.azurecr.io/giantswarm/kubectl-gs:latest help
Need help, got feedback?
We listen to your Slack support channel. You can also reach us at support@giantswarm.io. And of course, we welcome your pull requests!