k3s/BUILDING.md
Joakim Roubert 4286ba7163 Fix markdown files according to markdownlint recommendations
There are some issues and quirks in the markdown documentation files
suggested by the markdownlint project checker that might benefit from
being fixed, which this patch does.

Change-Id: I33245825e5bb543b5ce1732204984d4a0b169668
Signed-off-by: Joakim Roubert <joakimr@axis.com>
2020-03-04 11:06:55 +01:00

46 lines
1.3 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.
To build the full release binary run `make` and that will create `./dist/artifacts/k3s`.
Optionally to build the binaries using local go environment without running linting or building docker images:
```bash
./scripts/download && ./scripts/build && ./scripts/package-cli
```
For development, you just need go 1.12+ and a proper GOPATH. To compile the binaries run:
```bash
go build -o k3s
go build -o kubectl ./cmd/kubectl
go build -o hyperkube ./vendor/k8s.io/kubernetes/cmd/hyperkube
```
This will create the main executable at `./dist/artifacts` , but it does not include the dependencies like containerd, CNI,
etc. To run a server and agent with all the dependencies for development run the following
helper scripts:
```bash
# Server
./scripts/dev-server.sh
# Agent
./scripts/dev-agent.sh
```
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.