# kubectx

> Faster way to switch between clusters and namespaces in kubectl

Source: https://talira.ai/catalog/kubectx-s0j3g31z
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Command-line tool
- Categories: [infrastructure / kubernetes / clients](https://talira.ai/categories/infrastructure/kubernetes/clients)
- Platforms: macos, linux, windows[^2]
- Licence: Apache-2.0[^1]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Self-hostable: yes
- Creator: Ahmet Alp Balkan

kubectx and kubens are two small command-line tools from one repository: kubectx switches the current [kubectl](https://talira.ai/catalog/kubectl-s0j8r2b4.md) context (the cluster you talk to), and kubens switches the active namespace, each with a dash to go back to the previous one. With fzf installed both open an interactive fuzzy menu, and both have tab completion for bash, zsh and fish. They're written in Go, installable from Homebrew, apt, pacman, Chocolatey, Scoop, winget or as the krew plugins ctx and ns, under Apache-2.0.

## Links

- GitHub: https://github.com/ahmetb/kubectx

## Problems it solves

- typing kubectl config use-context with long cluster names every time I switch clusters
- I keep running commands against the production cluster by mistake because I forgot which context I'm in
- change the default namespace without adding -n to every kubectl command
- jump back to the cluster I was on a minute ago
- pick a cluster from a fuzzy-search list instead of remembering its exact name
- rename long EKS and GKE context names to something short
- switch between a dozen Kubernetes clusters quickly from the terminal

## Features

- kubectx switches kubeconfig contexts; kubens switches namespaces
- '-' switches back to the previous context or namespace
- interactive selection with fzf
- rename and delete contexts
- tab completion for bash, zsh and fish
- available as krew plugins ctx and ns

## Capabilities

- Has a command line tool: plan not known

## Trust

Overall: 0.46 out of 1.
Signals: maintenance 0.27, adoption 0.86, momentum 0.68, community 0.74, backing 0.20, extensibility 0.20.

- latest release v0.11.0 8 months ago
- 20.1k GitHub stars
- 69 contributors
- created by Ahmet Alp Balkan

Warnings:

- last commit 4 months ago

## Related

- Works with [kubectl](https://talira.ai/catalog/kubectl-s0j8r2b4.md)

## Alternatives

- [K9s](https://talira.ai/catalog/k9s-n03h698e.md): Kubernetes CLI to manage your clusters in style
- [kubectl](https://talira.ai/catalog/kubectl-s0j8r2b4.md): The Kubernetes command-line tool
- [Headlamp](https://talira.ai/catalog/headlamp-rr8ttjwp.md): An easy-to-use and extensible Kubernetes web UI
- [Lens](https://talira.ai/catalog/lens-qvy1q1f2.md): The IDE for everything but code
- [MCP Server Kubernetes](https://talira.ai/catalog/mcp-server-kubernetes-18vrr0nc.md): MCP server that lets AI assistants manage a Kubernetes cluster through kubectl and Helm

## Sources

[^1]: https://github.com/ahmetb/kubectx/blob/master/LICENSE (checked 23 Nov 2026)
[^2]: https://github.com/ahmetb/kubectx (checked 23 Nov 2026)
