Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
e826439e
Unverified
Commit
e826439e
authored
Aug 18, 2020
by
Brad Davidson
Committed by
GitHub
Aug 18, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update build instructions (#2136)
* Update build instructions Signed-off-by:
Brad Davidson
<
brad.davidson@rancher.com
>
parent
4e990b40
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
19 deletions
+8
-19
BUILDING.md
BUILDING.md
+8
-19
No files found.
BUILDING.md
View file @
e826439e
See the
[
release
](
https://github.com/rancher/k3s/releases/latest
)
page for pre-built releases.
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
The clone will be much faster on this repo if you do
```
bash
```
bash
git clone
--depth
1 https://github.com/rancher/k3s.git
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.
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`
.
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:.
Optionally to build the binaries using local Go environment without running linting or building docker images:
```
bash
```
bash
./scripts/download
&&
./scripts/build
&&
./scripts/package-cli
mkdir
-p
build/data
&&
./scripts/download
&&
go generate
```
```
For development, you just need go 1.12+ and a proper GOPATH. To compile the binaries run:
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
```
bash
go build
-o
k3s
SKIP_VALIDATE
=
true
make
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,
If you make any changes to go.mod and want to update the vendored modules, you should run the following before runnining
`make`
:
etc. To run a server and agent with all the dependencies for development run the following
helper scripts:
```
bash
```
bash
# Server
go mod vendor
&&
go mod tidy
./scripts/dev-server.sh
# Agent
./scripts/dev-agent.sh
```
```
Kubernetes Source
Kubernetes Source
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment