1

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

romanzdk
  • 930
  • 11
  • 30
  • Did you check the installation instructions here?https://kubectl.docs.kubernetes.io/installation/kustomize/source/ Or this if you want to install from a binary directly. https://kubectl.docs.kubernetes.io/installation/kustomize/binaries/ – Haril Satra Jan 24 '22 at 18:39
  • Yes, actually that's the tutorial I am following.. So with that `go install .` I get an error... I do not know what is wrong. As of binaries - when I try `./install_kustomize.sh 3.2.0` I get `Version v3.2.0 does not exist.` .... – romanzdk Jan 24 '22 at 18:43
  • If you check the list of available binaries at https://github.com/kubernetes-sigs/kustomize/releases?expanded=true&page=3&q=kustomize%2Fv3.2.0 there is no 3.2.0 version available. Can you not use 3.2.1, 3.2.2 or 3.2.3 instead? – Haril Satra Jan 24 '22 at 18:56
  • Edited original question – romanzdk Jan 24 '22 at 19:02
  • After further inspection the release with v3.2.0 is tagged with as just `v3.2.0` and not `kustomize/v3.2.0`. The script tries to find `release_url=${release_url}/tags/kustomize%2F$version` which is why it provides the error that `Version v3.2.0 does not exist` – Haril Satra Jan 24 '22 at 19:02
  • Maybe there is an issue with the script. Try downloading the binary directly from https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v3.2.1/kustomize_kustomize.v3.2.1_windows_amd64.exe and install it manually maybe? – Haril Satra Jan 24 '22 at 19:15
  • When running the exe I get `Windows protected your PC Microsoft Defender SmartScreen prevented an unrecognized app from starting. Running this app might put your PC at risk. More info` jesus christ... That's unbelieveable.. – romanzdk Jan 24 '22 at 19:17

1 Answers1

1

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.

Ferdy Pruis
  • 1,073
  • 8
  • 9