Skip to content

Instantly share code, notes, and snippets.

@bplasmeijer
Last active May 21, 2025 12:27
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
@sarveswarreddy
Copy link

To always install the latest k9s version or to update your existing k9s version on WSL

curl -s -L https://github.com/derailed/k9s/releases/download/$(curl -s https://api.github.com/repos/derailed/k9s/releases/latest | \
grep tag_name | cut -d '"' -f 4)/k9s_Linux_amd64.tar.gz -o k9s && tar -xvf k9s && chmod 755 k9s && rm LICENSE README.md && \
sudo mv k9s /usr/local/bin

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