Skip to content

Instantly share code, notes, and snippets.

@bplasmeijer
Last active April 9, 2025 19:44
Show Gist options
  • Save bplasmeijer/a4845a4858f1c0b0a22848984475322d to your computer and use it in GitHub Desktop.
Save bplasmeijer/a4845a4858f1c0b0a22848984475322d to your computer and use it in GitHub Desktop.
set-up K9S on #WSL2
#!/bin/bash
set -e
source <(curl -sSL benco.io/lib) # Load libary from remote URL, it's safe!
GITHUB="derailed/k9s"
VERSION=${1:-"$(get_latest_release $GITHUB)"}
INSTALL_DIR=${2:-"$HOME/.local/bin"}
CMD=k9s
NAME="k9s terminal UI for Kubernetes"
pre_run
curl -sSL "https://github.com/$GITHUB/releases/download/v${VERSION}/k9s_Linux_amd64.tar.gz" | \
tar -zx -C "$INSTALL_DIR" $CMD
post_run version
@bplasmeijer
Copy link
Author

bplasmeijer commented Mar 26, 2020

@dschulman-repay
Copy link

I prefer to use something along the lines of

curl -s -L https://github.com/derailed/k9s/releases/download/v0.24.10/k9s_v0.24.10_Linux_x86_64.tar.gz -o k9s && tar -xvf k9s && chmod 755 k9s && rm LICENSE && mv README.md ~/Docs/k9s_README.md && sudo chown root: k9s && sudo mv k9s /usr/local/bin

@rsignell-usgs
Copy link

rsignell-usgs commented Mar 24, 2022

Just updated to current version (as of 10/27/2023) and throwing away the readme also:

curl -s -L https://github.com/derailed/k9s/releases/download/v0.27.4/k9s_Linux_amd64.tar.gz -o k9s && tar -xvf k9s && chmod 755 k9s && rm LICENSE README.md  && sudo mv k9s /usr/local/bin

@coarsehorse
Copy link

Should be sudo mv ./k9s /usr/local/bin/k9s instead of mv ./k9s /usr/local/bin/k9s

@coarsehorse
Copy link

And also check the latest release here: https://github.com/derailed/k9s/releases

@Pl8tinium
Copy link

ty for the gist

@juansalmeronmoya
Copy link

Just updated to current version (as of 10/27/2023) and throwing away the readme also:

curl -s -L https://github.com/derailed/k9s/releases/download/v0.27.4/k9s_Linux_amd64.tar.gz -o k9s && tar -xvf k9s && chmod 755 k9s && rm LICENSE README.md  && sudo mv k9s /usr/local/bin

updated to v0.40.5

curl -s -L https://github.com/derailed/k9s/releases/download/v0.40.5/k9s_Linux_amd64.tar.gz -o k9s && tar -xvf k9s
&& chmod 755 k9s && rm LICENSE README.md  && sudo mv k9s /usr/local/bin

@bplasmeijer
Copy link
Author

Update without fixed version in the script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment