在 Windows 上构建 kustomize 3.2.0

Build kustomize 3.2.0 on Windows

有人可以建议如何在 Windows 上安装 3.2.0 版的 kustomize 吗?

我特别需要 Windows 上的 v3.2.0。我正在关注 this 教程。

源代码:https://github.com/kubernetes-sigs/kustomize/releases/tag/v3.2.0

我下载了 zip 文件并安装了 Go。但是,当我在那个 kustomize 文件夹中 运行 go install . 时,我得到:no Go files in path/kustomize/.. 也逐步尝试了上述教程,但同样的错误..

编辑:尝试通过 https://github.com/kubernetes-sigs/kustomize/blob/master/hack/install_kustomize.sh ./install_kustomize.sh 3.2.0 安装,我得到:Version v3.2.0 does not exist.

当我尝试 ./install_kustomize.sh 3.2.1 时,我得到:

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

环境:Windows10,在GITBash

中执行

您需要 运行 go install ./cmd/kustomize/。 那就是你想要构建 main.go 的地方。

这将在您的 %GOBIN% 中安装可执行文件。
您可能想使用 go build -o kustomize.exe ./cmd/kustomize/ 来获取当前工作目录中的可执行文件。