Go Source

Install Kustomize from the Go source code

Requires Go to be installed.

Install the kustomize CLI from source without cloning the repo

  1. GOBIN=$(pwd)/ GO111MODULE=on go get sigs.k8s.io/kustomize/kustomize/v3

Install the kustomize CLI from local source with cloning the repo

  1. # Need go 1.13 or higher
  2. unset GOPATH
  3. # see https://golang.org/doc/go1.13#modules
  4. unset GO111MODULES
  5. # clone the repo
  6. git clone git@github.com:kubernetes-sigs/kustomize.git
  7. # get into the repo root
  8. cd kustomize
  9. # Optionally checkout a particular tag if you don't
  10. # want to build at head
  11. git checkout kustomize/v3.2.3
  12. # build the binary
  13. (cd kustomize; go install .)
  14. # run it
  15. ~/go/bin/kustomize version