pickfit

BrowseInfra & DevOps tools

kubectx

Command-line tools for switching kubectl contexts (clusters) and Kubernetes namespaces, with optional isolated or read-only shells.

Tested on Linux

Use it

Linux x86_64

You need first

  • System packages: kubectl, fzf (optional, for interactive mode)
  1. Download v0.11.0 kubectx and kubens release binaries into ~/.local/bin

    cd /tmp && curl -fsSLO https://github.com/ahmetb/kubectx/releases/download/v0.11.0/kubectx_v0.11.0_linux_x86_64.tar.gz && curl -fsSLO https://github.com/ahmetb/kubectx/releases/download/v0.11.0/kubens_v0.11.0_linux_x86_64.tar.gz && tar xzf kubectx_v0.11.0_linux_x86_64.tar.gz kubectx && tar xzf kubens_v0.11.0_linux_x86_64.tar.gz kubens && install -m755 kubectx kubens ~/.local/bin/
  2. Install kubectl v1.37.2 (README prerequisite, needed for kubectx -s)

    curl -fsSLo /tmp/kubectl https://dl.k8s.io/release/v1.37.2/bin/linux/amd64/kubectl && install -m755 /tmp/kubectl ~/.local/bin/kubectl

Check that it works

kubectx --version

The output should contain “0.11.0”.

First thing to try

mkdir -p ~/.kube && cat > ~/.kube/config <<'EOF'
apiVersion: v1
kind: Config
clusters:
- name: c1
  cluster:
    server: https://127.0.0.1:6443
- name: c2
  cluster:
    server: https://127.0.0.1:6444
users:
- name: u1
  user:
    token: dummy
contexts:
- name: minikube
  context:
    cluster: c1
    user: u1
- name: oregon
  context:
    cluster: c2
    user: u1
- name: test
  context:
    cluster: c1
    user: u1
current-context: oregon
EOF
kubectx minikube && kubectx - && KUBECTX_IGNORE_FZF=1 kubectx

Run kubectx to list your kubectl contexts, or kubens to work with namespaces.

What it does

  • Switch between kubectl contexts
    How to use it
    1. Run kubectx <context> to switch to another context.
    2. Run kubectx - to go back to the previous context.
    3. Run KUBECTX_IGNORE_FZF=1 kubectx to list all contexts.
    Tested
  • Switch Kubernetes namespaces
    How to use it
    1. Run kubens <namespace> -f to set the active namespace, even if it does not exist yet.
    Tested
  • Open read-only or isolated shells
    How to use it
    1. Run kubectx -s <context> to open a shell where only that context is active.
    2. Type exit to leave the isolated shell.
    Tested
  • Search contexts interactively with fzf
    Not tested

How far pickfit got

Linux x86_64

  1. Installs
  2. Starts
  3. 3 of 4 features work
  4. Works offline

macOS and Windows: the project says it runs there; pickfit hasn’t tried it.

Good for

  • switch kubectl to another cluster context
  • change the active Kubernetes namespace
  • open a read-only shell that blocks cluster writes
  • rename a kubeconfig context

How pickfit tested it

Each run starts from a clean machine and follows the steps above. How pickfit verifies

Linux x86_64

Its main function works

  • Replayed from scratch
  • Works offline
  • Checked on 15 Nov 2026
  • Version 0.11.0

Differences the test machine hit

  • README: sudo apt install kubectx / sudo pacman -S kubectx / kubectl krew install ctx
    In the test: No sudo or krew in this box; used the README's alternative: release binaries from GitHub Releases put on PATH
  • README: kubectx -s minikube (kubectl listed as a prerequisite)
    In the test: kubectl must be on PATH for -s; without it: 'error: kubectl is required for --shell but was not found in PATH'. Context/namespace switching with -f works without kubectl
  • README: $ kubectx -s minikube starts an interactive shell
    In the test: With no TTY, SHELL was pointed at a small script so the isolated shell ran non-interactively

How to read a tool card

Stitching
pickfit installed this tool itself. Everything under the stitches comes from that run. A tool pickfit has not run never gets stitches.
Verified on your OS
The install steps ran on the system you chose. “Ran on Linux only” means it has not been run on yours yet.
macOS, Linux and WindowsWhere it ran
Green OS marks: pickfit ran the install steps there. Grey ones: the README says it runs there, and pickfit has not tried.
How far the run got
Installs and starts, its main function works, its service answers, it produces model output. A window means a desktop app opened; a plug, an MCP client used it. The mark sits beside the run’s result, under “Why it fits and how we know” and in “How pickfit tested it”.
Visual check
pickfit looked at screenshots of the app. Green: it looks right. Amber with a number: things that look wrong; open it to see them. Grey and dashed: not checked yet.
Known vulnerabilities
Known high or critical vulnerabilities (OSV.dev) in what it installs. Green: none known. Red with a number: how many; open it for the list, and read it before you install. Grey and dashed: not checked, which does not mean safe.
About the run
The day it ran, and the version that ran.
Source of a reason
Every reason a pick fits rests on one profile field. Open the reason to see the field and the value it relies on.
Hidden gem
High quality, little known.
Quality and popularity
Two scores out of 100. Quality: how well it installed and worked when pickfit tried it, and how good its install docs and upkeep are. Popularity: from stars, downloads and Hacker News.
Features checked
Of the main features the README advertises, how many the run actually exercised (green), and how many failed (red). Grey ones were not checked, and the card says why.
Not verified
A well-known tool Fitz mentions from general knowledge. No run record, no steps, no score.