Refactor: Use `go tool` instead of `go install` when executing internal CLI tools
Author: koba1tCreated Aug 27, 2025Updated Sep 27, 2026
Labelskind/cleanuptriage/accepted
About
During development, execute the internal CLI binary without installing it locally, but rather via go tool.
Specifically, consolidate the installation and execution of binaries run via makefiles, shell scripts, etc., into a single CLI call through go tool
This eliminates the need to install binaries via go install each time, and can potentially prevent issues like using outdated versions of tools installed in your computer's GOBIN.
How to migrate
- Since each CLI tool is called from shell scripts,
go generate, or Makefiles, replace the invocations withgo tool BINARY_NAME. - Locate and remove all instances where CLI tools are being
go installed. - Verify that the CLI can be called
Tools List
in repo tools
- gorepomod https://github.com/kubernetes-sigs/kustomize/pull/5963
- mdtogo
- pluginator
external tools
- golangci-lint
- mdrip
- stringer
- goimports
- mdtogo
- addlicense
- kind
- controller-gen
- embedmd
- go-bindata
- go-apidiff
- gh
- kubeval
Source: kubernetes-sigs/kustomize