mirror of https://github.com/k3s-io/k3s
35 lines
1.2 KiB
Markdown
35 lines
1.2 KiB
Markdown
See the [release](https://github.com/rancher/k3s/releases/latest) page for pre-built releases.
|
|
|
|
The clone will be much faster on this repo if you do
|
|
```bash
|
|
git clone --depth 1 https://github.com/rancher/k3s.git
|
|
```
|
|
|
|
This repo includes all of Kubernetes history so `--depth 1` will avoid most of that.
|
|
|
|
The k3s build process requires some autogenerated code and remote artifacts that are not checked in to version control.
|
|
To prepare these resources for your build environment, run:.
|
|
```bash
|
|
mkdir -p build/data && ./scripts/download && go generate
|
|
```
|
|
|
|
To build the full release binary, you may now run `make`, which will create `./dist/artifacts/k3s`.
|
|
|
|
To build the binaries using without running linting (ie; if you have uncommitted changes):
|
|
```bash
|
|
SKIP_VALIDATE=true make
|
|
```
|
|
|
|
If you make any changes to go.mod and want to update the vendored modules, you should run the following before runnining `make`:
|
|
```bash
|
|
go mod vendor && go mod tidy
|
|
```
|
|
|
|
Kubernetes Source
|
|
-----------------
|
|
|
|
The source code for Kubernetes is in `vendor/` and the location from which that is copied
|
|
is in `./go.mod`. Go to the referenced repo/tag and you'll find all the patches applied
|
|
to upstream Kubernetes.
|
|
|