# kubens

> For the complete documentation index, see [llms.txt](https://docs-stg.ringleader.dev/llms.txt).


> Fast switching between Kubernetes namespaces.


Installs `kubens`, for switching the active namespace of the current Kubernetes
context.

```yaml
devtools:
  - name: kubens
```

## Version behavior

| `version` | Result |
|-----------|--------|
| omitted | the distribution's `kubectx` package, which provides `kubens` |
| `v0.9.5` or `0.9.5` | the official upstream release tarball for the workstation's architecture |

`kubectx` and `kubens` are released together, so a pinned version selects the same
upstream release for both.

## Updates

Without a `version`, kubens comes from the distribution's packages, so it moves with the
[operating system updates](https://docs-stg.ringleader.dev/reference/tools/devtools/#operating-system-updates) the workstation applies. An upstream release you pinned
with `version` stays on it.

## Example

```yaml
devtools:
  - name: kubectl
  - name: kubectx
    version: v0.9.5
  - name: kubens
    version: v0.9.5
  - name: fzf
```

## Notes

- Because the versionless install comes from the shared `kubectx` package, declaring
  only `kubens` still lands `kubectx` on the workstation. The recipe checks for the
  `kubens` binary specifically, so declaring both installs once, and a workstation that
  already has `kubens` keeps its release when you change `version`.
- With [`fzf`](https://docs-stg.ringleader.dev/reference/tools/devtools/fzf/) present, running `kubens`
  with no argument opens an interactive picker.
- Works on Debian, Ubuntu, and Alpine.

