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: kubectlVersion 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: 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 selectionNotes
- The recipe is safe to re-run: a workstation that already has the declared release is skipped.
- The
kinddevtool installskubectlitself when it needs it, so you do not have to declare both. Declaringkubectlexplicitly is how you pin its version. - Works on Debian, Ubuntu, and Alpine.