Build kustomize 3.2.0 on Windows

Issue

Can someone suggest how to install 3.2.0 version of kustomize on Windows, please?

I need specifically v3.2.0 on Windows. I am following this tutorial.

Source code: https://github.com/kubernetes-sigs/kustomize/releases/tag/v3.2.0

I downloaded the zip file and installed Go. However when I run go install . inside that kustomize folder i get: no Go files in path/kustomize/..
Also tried step by step aforementioned tutorial but same error..

EDIT: Trying to install via https://github.com/kubernetes-sigs/kustomize/blob/master/hack/install_kustomize.sh ./install_kustomize.sh 3.2.0 I get: Version v3.2.0 does not exist.

When I try ./install_kustomize.sh 3.2.1 I get:

tar (child): ./kustomize_v*_windows_amd64.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now

Env: Windows 10, executing in GIT Bash

Solution

You’ll need to run go install ./cmd/kustomize/.
That is where the main.go is you want built.

This will install the executable in your %GOBIN%.
You might want to use go build -o kustomize.exe ./cmd/kustomize/ instead to get the executable in your current working directory.

Answered By – Ferdy

Answer Checked By – Candace Johnson (GoLangFix Volunteer)

Leave a Reply

Your email address will not be published.