Skip to content

Installing Kustomize

Outcome: the standalone binary on your machine, its version printed, and an honest answer to "but doesn't kubectl already have this?" with the evidence from the lab's two copies.

The standalone binary

Kustomize is published as a single static binary per platform on the project's GitHub releases page (kubernetes-sigs/kustomize, releases tagged kustomize/vX.Y.Z). The lab installed v5.8.3 on Linux exactly this way:

$ curl -LO https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v5.8.3/kustomize_v5.8.3_linux_amd64.tar.gz
$ curl -LO https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v5.8.3/checksums.txt
$ grep linux_amd64 kustomize_checksums.txt
cb9e31198d3f63b44848bd0afc4c8efc56e6cfef9c93a4a39a211940e6decd61  kustomize_v5.8.3_linux_amd64.tar.gz
$ sha256sum kustomize.tar.gz   # (the downloaded file, renamed)
cb9e31198d3f63b44848bd0afc4c8efc56e6cfef9c93a4a39a211940e6decd61  kustomize.tar.gz
$ tar -xzf kustomize.tar.gz
$ ./kustomize version
v5.8.3

The two hashes matched before the binary ever ran — the checksums file is the project telling you what it shipped, and comparing costs ten seconds. Other routes exist (package managers, go install, the install script on the project's site); they are listed in the documentation and were not the lab's route, so this guide does not grade them. Whichever route you take, the check is the same:

$ kustomize version
v5.8.3

(Transcript t00 in the lab.)

The copy inside kubectl

If you already have kubectl, you already have a kustomize: kubectl kustomize <folder> builds, and kubectl apply -k <folder> builds and applies in one motion. It is the same engine, bundled into kubectl's releases — which means its version follows kubectl's, and usually trails the standalone by a little. The lab put the two side by side (transcript t00, t10):

$ kustomize version
v5.8.3
$ kubectl version --client
Client Version: v1.37.2
Kustomize Version: v5.8.1

Same engine, two releases: standalone 5.8.3, kubectl 1.37.2 carrying 5.8.1. Does the gap matter? On the lab's base the two printed byte-identical output — chapter 4's build run through both, diffed, no differences (t10). That is the expected state of affairs: minor version gaps rarely change output for ordinary fields, but "rarely" is why this guide standardises on the standalone binary. When a build matters, pin the tool the same way you pin an image tag, and let your pipeline and your laptop run the same version. Features also land in the standalone first; the labels: field of chapter 2 travelled exactly that road.

What you do not need

No cluster. No account, no daemon, no network after the download. A build is reading files and printing text, so the rest of this guide runs anywhere the binary runs — including, as the lab demonstrates, a small sandbox with no Kubernetes within a mile of it.

With kustomize version printing, build the base.