Skip to content
09f31d9
Compare
Choose a tag to compare

NOTE: The stable versions of kubectx and kubens are the Bash script implementations (i.e. the ./kubectx and ./kubens files below). Go-based implementations are still unstable and are work-in-progress.

Changelog

  • [Go implementation] Fix typo in kubens --help
  • [Go implementation] Release binaries for arm64 (armv8) and armhf (armv6), armv7
  • [Go implementation] Fix colorized outputs on windows
  • [Go implementation] Handle context names with : character (e.g. AWS EKS)
  • [Go implementation] Switching with kubens no longer requires "List Namespace" permissions
  • [Go implementation] Fix messages while interactively switching context with fzf(1).

Known Issues

  • [Go implementation] kubectx: doesn't work with multiple kubeconfig files (#211)
  • [Go implemen…
d603c7d
Compare
Choose a tag to compare

🥳 BIG NEWS: Go rewrite

With this release, the kubectx and kubens rewritten in Go (if you didn't know, existing implementations were just 200-line Bash scripts). Please try out the new versions written in Go and give feedback!

Why rewrite in Go?

  • kubectx/kubens no longer depends on kubectl
  • you can switch between clusters up to 8-15x faster, compared to the bash versions which called out to kubectl.
  • you can now use kubectx/kubens on Windows (please try it out!)
  • you should not notice any behavior differences

Miss the bash-based implementations? Don't worry! I intend to keep mini versions of kubectx and kubens available in maintenance mode for the foreseeable future! Plus, this new version is actually backwards compatible with them!

For sta…

d3295e5
Compare
Choose a tag to compare
  • FEATURE: Introduced --unset/-u option for kubectx to remove the current namespace setting.
Compare
Choose a tag to compare
  • FIX: fzf is now called with --no-preview option to prevent the preview pane from showing up (#163)
  • FEATURE: zsh completion for context names while deleting (kubectx -d) (#178)
  • IMPROVED: friendly --help strings when executed as a kubectl plugin (kubectl ctx and kubectl ns)
a216382
Compare
Choose a tag to compare
  • FEATURE: Introduced -c/--current flag to print current context or namespace.
  • FIX: kubectx rename functionality now checks if the context with the OLD_NAME exists before deleting the context with specified NEW_NAME for overwriting.
10c9bd5
Compare
Choose a tag to compare
  • FIX: Show current context/ns color in interactive (fzf) mode. (#109)
  • TEST: Add integration tests for kubectx (#111, #113) and kubens (#105, #117)
dfeb7df
Compare
Choose a tag to compare
  • FEATURE: use XDG_CACHE_HOME to store data instead of $HOME/.kube if available
    (#93)
  • FEATURE: introduce KUBECTX_IGNORE_FZF variable to override interactive mode
    when fzf is detected (#82)
  • FIX: support Windows Subsystem for Linux (WSL) by detecting kubectx.exe in
    PATH when kubectl is not (#96)
  • FIX: zsh completion script glitch that printed only two contexts (#81)
  • IMPROVED: print errors when kubectl[.exe] is not detected in PATH (#92)
  • IMPROVED: better error handling when executed subcommands (like kubectl) fail
    (#95)