For the complete documentation index, see llms.txt. A markdown version of this page is at /reference/tools/devtools/kubectl/index.md.

kubectl

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

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

devtools:
  - name: kubectl

Version behavior

versionResult
omittedthe current upstream stable release, resolved at install time
v1.31.0that 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: about once a day, it moves to the current upstream stable release.

Example

A Kubernetes operator’s toolbox:

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 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.