# kubectl

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


> The Kubernetes CLI, installed as a static binary for the workstation's architecture.


Installs `kubectl` as a static binary in `/usr/local/bin`.

```yaml
devtools:
  - name: kubectl
```

## Version behavior

| `version` | Result |
|-----------|--------|
| omitted | the current upstream **stable** release, resolved at install time |
| `v1.31.0` | that exact release |

A changed `version` replaces the installed release on the next configuration pass.

## Updates

With `updatePolicy: latest` and no `version`, kubectl takes the
[vendor's current release route](https://docs.ringleader.dev/reference/tools/devtools/#update-routes): about once a day, it moves to the current upstream
stable release.

## Example

A Kubernetes operator's toolbox:

```yaml
devtools:
  - name: kubectl
  - name: helm
  - name: kubectx
  - name: kubens
  - name: fzf          # kubectx/kubens use fzf for interactive selection
```

## Notes

- The recipe is safe to re-run: a workstation that already has the declared release is
  skipped.
- The [`kind`](https://docs.ringleader.dev/reference/tools/devtools/kind/) devtool installs `kubectl`
  itself when it needs it, so you do not have to declare both. Declaring `kubectl`
  explicitly is how you pin its version.
- Works on Debian, Ubuntu, and Alpine.

