Skip to content
Lightweight Kubernetes. 5 less than k8s.
Go Shell HCL Other
Branch: master
Clone or download

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/ISSUE_TEMPLATE Ask more clearly for K3s args and logs Mar 13, 2020
cmd Update check-config.sh for k3s Nov 13, 2019
contrib contrib/ansible: Add reset role and playbook to reset a node (#1565) Mar 25, 2020
e2e Add e2e tests Feb 28, 2019
manifests feat: add master taint toleration to klipper, coredns, metrics-server… Mar 25, 2020
package Fix error when get version using Wget Mar 22, 2020
pkg feat: add master taint toleration to klipper, coredns, metrics-server… Mar 25, 2020
scripts Let variable handle go binary name in scripts (#1532) Mar 25, 2020
tests/perf Merge pull request #1494 from joakimr-axis/joakimr-axis_backticks Mar 25, 2020
vendor Bump cri to 1.3.0-k3s.5 Mar 20, 2020
.dockerignore Add rpm build & repo publish Mar 10, 2020
.drone.yml Use curl to send dispatch event to k3s-upgrade repo Mar 16, 2020
.gitignore Check for changes in the airgap image list Mar 10, 2020
.golangci.json Upgrade to golangci-lint Mar 25, 2019
BUILDING.md Fix markdown files according to markdownlint recommendations Mar 4, 2020
Dockerfile.dapper Dockerfile.dapper: Add proxy handling (#1499) Mar 25, 2020
Dockerfile.manifest Upgrade golang to v1.13.8 Feb 14, 2020
Dockerfile.test.dapper Upgrade golang to v1.13.8 Feb 14, 2020
LICENSE Initial Commit Jan 1, 2019
Makefile Use contemporary $() instead of legacy `` in shell commands Mar 4, 2020
README.md Fix markdown files according to markdownlint recommendations Mar 4, 2020
Vagrantfile Reduce memory for dev vms Mar 17, 2020
docker-compose.yml Remove docker-compose default token Dec 13, 2019
go.mod Bump cri to 1.3.0-k3s.5 Mar 20, 2020
go.sum Bump cri to 1.3.0-k3s.5 Mar 20, 2020
install.sh Check for k3s policy and provide install hints Mar 30, 2020
k3s.service Add a little extra delay between restart attempts Jul 25, 2019
main.go Drop openapi hack Aug 29, 2019
vendor.go Update k3s for k8s 1.17.0 Dec 16, 2019

README.md

k3s - 5 less than k8s

Lightweight Kubernetes. Easy to install, half the memory, all in a binary less than 40mb.

Great for:

  • Edge
  • IoT
  • CI
  • ARM
  • Situations where a PhD in k8s clusterology is infeasible

What is this?

k3s is intended to be a fully compliant Kubernetes distribution with the following changes:

  1. Removed most in-tree plugins (cloud providers and storage plugins) which can be replaced with out of tree addons.
  2. Add sqlite3 as the default storage mechanism. etcd3 is still available, but not the default.
  3. Wrapped in simple launcher that handles a lot of the complexity of TLS and options.
  4. Minimal to no OS dependencies (just a sane kernel and cgroup mounts needed). k3s packages required dependencies
    • containerd
    • Flannel
    • CoreDNS
    • CNI
    • Host utilities (iptables, socat, etc)

Documentation

Please see the official docs site for complete documentation on k3s.

Quick-Start - Install Script

The k3s install.sh script provides a convenient way for installing to systemd or openrc, to install k3s as a service just run:

curl -sfL https://get.k3s.io | sh -

A kubeconfig file is written to /etc/rancher/k3s/k3s.yaml and the service is automatically started or restarted. The install script will install k3s and additional utilities, such as kubectl, crictl, k3s-killall.sh, and k3s-uninstall.sh, for example:

sudo kubectl get nodes

K3S_TOKEN is created at /var/lib/rancher/k3s/server/node-token on your server. To install on worker nodes we should pass K3S_URL along with K3S_TOKEN or K3S_CLUSTER_SECRET environment variables, for example:

curl -sfL https://get.k3s.io | K3S_URL=https://myserver:6443 K3S_TOKEN=XXX sh -

Manual Download

  1. Download k3s from latest release, x86_64, armhf, and arm64 are supported.
  2. Run server.
sudo k3s server &
# Kubeconfig is written to /etc/rancher/k3s/k3s.yaml
sudo k3s kubectl get nodes

# On a different node run the below. NODE_TOKEN comes from
# /var/lib/rancher/k3s/server/node-token on your server
sudo k3s agent --server https://myserver:6443 --token ${NODE_TOKEN}
You can’t perform that action at this time.