add a note about go get inside go module projects

This commit is contained in:
Benjamin Elder
2020-08-19 10:51:34 -07:00
parent 3fbea74c6b
commit 89c84494e6
2 changed files with 12 additions and 2 deletions

View File

@@ -21,10 +21,15 @@ kind bootstraps each "node" with [kubeadm][kubeadm]. For more details see [the d
## Installation and usage
For a complete [install guide] see [the documentation here][install guide].
You can install kind with `GO111MODULE="on" go get sigs.k8s.io/kind@v0.8.1`.
**NOTE**: please use the latest go to do this, ideally go 1.13 or greater.
**NOTE**: `go get` should not be run from a Go [modules] enabled project directory,
as go get inside a modules enabled project updates dependencies / behaves differently. Try for example `cd $HOME` first.
This will put `kind` in `$(go env GOPATH)/bin`. If you encounter the error
`kind: command not found` after installation then you may need to either add that directory to your `$PATH` as
shown [here](https://golang.org/doc/code.html#GOPATH) or do a manual installation by cloning the repo and run
@@ -147,3 +152,4 @@ Participation in the Kubernetes community is governed by the [Kubernetes Code of
[@munnerz]: https://github.com/munnerz
[contributor guide]: https://kind.sigs.k8s.io/docs/contributing/getting-started
[releases]: https://github.com/kubernetes-sigs/kind/releases
[install guide]: https://kind.sigs.k8s.io/docs/user/quick-start/#installation

View File

@@ -23,11 +23,15 @@ and run `make build` from the repository.
Please use the latest Go when installing KIND from source, ideally go 1.14 or greater.
This will put `kind` in `$(go env GOPATH)/bin`. You may need to add that directory to your `$PATH` as
`go get` will put `kind` in `$(go env GOPATH)/bin`. You may need to add that directory to your `$PATH` as
shown [here](https://golang.org/doc/code.html#GOPATH) if you encounter the error
`kind: command not found` after installation.
Without installing Go, kind can be built reproducibly with docker using `make build`.
**NOTE**: `go get` should not be run from a Go [modules] enabled project directory,
as go get inside a modules enabled project updates dependencies / behaves differently. Try for example `cd $HOME` first.
Without installing Go, kind can be built reproducibly with docker using `make build`,
the binary will be in `bin/kind`.
Stable binaries are also available on the [releases] page.
Stable releases are generally recommended for CI usage in particular.