Skip to content

k3s

Website k3s docs

Installation

curl2bash

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

Uninstall:

/usr/local/bin/k3s-uninstall.sh

k3s wrappers / installers

Usage

Resource usage

k3s components

networking

https://rancher.com/docs/k3s/latest/en/networking/

servicelb

k3os

Uses:

  • containerd
  • crictl
  • Flannel
  • CoreDNS
  • Host utilities (iptables, socat, etc)

Logs:

  • /var/lib/rancher/k3s/agent/containerd/containerd.log
  • /var/log/containers/
  • /var/log/pods/
  • /var/log/k3s-service.log

Storage: /var/lib/rancher/k3s/storage/

vagrant

https://app.vagrantup.com/boxes/search?utf8=%E2%9C%93&sort=downloads&provider=&q=k3os

Install with virt-install

https://github.com/rancher/k3os/issues/133

cd ~/kubernetes/os/k3os
wget https://github.com/rancher/k3os/releases/download/v0.9.0/k3os-amd64.iso
./install.sh
  • login with user rancher
  • sudo k3os install
  • remove the ISO from the virtual machine and reboot

Running

virsh start --console k3os
ssh k3os
  • ssh only accepts public keys

Dont use traefik: https://github.com/rancher/k3os/issues/69#issuecomment-570768225

Procs after first install:

  • /sbin/init -> /bin/busybox
  • bpfilter_umh
  • udevd
  • acpid
  • supervise-daemo

k3d

k3s in docker: k3d

K3s terraform module

https://registry.terraform.io/modules/xunleii/k3s/module/latest

K3s ansible module