- What is K3s
- K3s architecture & Setup a cluster way
- How K3s reduces the size of Kubernetes
- What is K3sup and usage
- K3s experience on ARM planform
- Summary
• Designed for production workloads • Great for (5 less than k8s) – Edge, IoT, CI, ARM – Situations where a PhD in k8s clusterology is infeasible • Minimum System Requirements • Linux 3.10+ • 512 MB of ram per server • 75 MB of ram per node • 200 MB of disk space • x86_64, ARMv7, ARM64 6
cluster way • How K3s reduces the size of Kubernetes • What is K3sup and usage • K3s experience on ARM planform • Summary Setup a K3s cluster way github.com/sufuf3/k3s-lab 9
cluster way • How K3s reduces the size of Kubernetes • What is K3sup and usage • K3s experience on ARM planform • Summary How K3s reduces the size of Kubernetes 13
extra features • Eliminating external dependencies • Reducing the number of binaries required at runtime • Reducing the complexity of installation From: Accelerating Edge Computing with Arm and Rancher k3s Lightweight Kubernetes
storage drivers Add by admin: https://kubernetes-csi.github.io/docs/drivers.html • Removing over 1 million lines of code Removing old and non-essential code (Cont.) 17
– Combined the processes that typically run on a Kubernetes management server into a single process – Combined the Kubelet, kube-proxy and flannel agent that run on a worker node into a single process 18
time="2019-10-09T14:01:09.988580431Z" level=info msg="Fetching bootstrap data from etcd" Oct 09 14:01:10 master k3s[1067]: time="2019-10-09T14:01:10.050587488Z" level=info msg="Running kube-apiserver ... --etcd-servers=unix://kine.sock ... --storage-backend=etcd3 … $ ls /var/lib/rancher/k3s/server/ cred db kine.sock manifests node-token static tls Introducing SQLite as an optional datastore in addition to etcd (Cont.) 22
`CREATE TABLE IF NOT EXISTS kine ( id INTEGER primary key autoincrement, name INTEGER, created INTEGER, deleted INTEGER, create_revision INTEGER, prev_revision INTEGER, lease INTEGER, value BLOB, old_value BLOB )`, `CREATE INDEX IF NOT EXISTS kine_name_index ON kine (name)`, `CREATE UNIQUE INDEX IF NOT EXISTS kine_name_prev_revision_uindex ON kine (name, prev_revision)`, } Introducing SQLite as an optional datastore in addition to etcd (Cont.) 23
Use traefik • k8s endpoint (Can’t be disabled) – Load balancer (tcpproxy) • Provide connectivity for HA scenarios – Reverse Tunnel connection • For master node's api-servers to communicate to agent node's kubelet & containerd Tunnel Proxy and ServiceLB 24
cluster way • How K3s reduces the size of Kubernetes • What is K3sup and usage • K3s experience on ARM planform • Summary Setup a k3s cluster via k3sup 27 github.com/sufuf3/k3sup-lab
k3sup – k3s cluster: N nodes for setting a k3s cluster 2. Make sure k3sup host can use SSH public-key authentication to connect to N nodes 3. On k3sup host: Install k3sup and setup k3s cluster (Next Page) Setup k3s cluster steps via k3sup 28
cluster way • How K3s reduces the size of Kubernetes • What is K3sup and usage • K3s experience on ARM planform • Summary K3s experience on ARM planform 30
Linux kernel version before compile – Cgroup issue in some Linux kernel version (If you use docker) – Modify the kernel config file & all needed modules are turn on • Don't use K3s v0.9.0 in ARM planform – https://github.com/rancher/k3s/issues/828 32
which is ideal for accelerating and delivering solutions at the Edge – Kubernetes is operationally challenging for the edge case • K3s design & implementation overview – Removing extra features – Eliminating external dependencies – Reducing the number of binaries required at runtime – Reducing the complexity of installation • K3s cluster can setup via k3s script or k3sup • 33
edition Hacktoberfest shirt, you must register and make 4 pull requests (PRs) between October 1-31 (in any time zone). PRs can be made to any public repo on GitHub 34