Skip to content

k3s

Website k3s docs

Requirements

Minimal K3S requirements:

Server / Control plane Agent / Node
Disk space 15 GB 15 GB
RAM 2 GB 512 MB
CPU 2 cores 1 core

Installation

curl2bash

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

Uninstall:

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

Remove agent from cluster

kubectl delete node NODENAME

Optimization

Usage

Use k3s crictl cmd:

k3s crictl images

Manually prune unused images:

k3s crictl rmi --prune

Resource usage

k3s components

networking

The K3s server needs port 6443 to be accessible by all nodes. The nodes need to be able to reach other nodes over UDP port 8472 when using the Flannel VXLAN backend, or over UDP port 51820 (…) when using the Flannel WireGuard backend

Tailscale integration

servicelb

CoreDNS

Customizing CoreDNS

  • K8s docs: Customizing DNS Service
  • k3s coredns Corefile imports config files from /etc/coredns/custom/*.server
  • If the configMap coredns-custom is present, it will get mounted to /etc/coredns/custom and imported by the main Corefile

k3s wrappers / installers

k3d

k3s in docker: k3d

K3s ansible module