Requirements
K3s is very lightweight, but has some minimum requirements as outlined below.
Whether you're configuring K3s to run in a container or as a native Linux service, each node running K3s should meet the following minimum requirements. These requirements are baseline for K3s and its packaged components, and do not include resources consumed by the workload itself.
Prerequisites
Two nodes cannot have the same hostname.
If multiple nodes will have the same hostname, or if hostnames may be reused by an automated provisioning system, use the --with-node-id
option to append a random suffix for each node, or devise a unique name to pass with --node-name
or $K3S_NODE_NAME
for each node you add to the cluster.
Architecture
K3s is available for the following architectures:
- x86_64
- armhf
- arm64/aarch64
- s390x
Prior to May 2023 releases (v1.24.14+k3s1, v1.25.10+k3s1, v1.26.5+k3s1, v1.27.2+k3s1), on aarch64/arm64
systems, the kernel must use 4k pages. RHEL9, Ubuntu, Raspberry PI OS, and SLES all meet this requirement.
Operating Systems
K3s is expected to work on most modern Linux systems.
Some OSs have additional setup requirements:
- Red Hat Enterprise Linux / CentOS / Fedora
- Ubuntu / Debian
- Raspberry Pi
It is recommended to turn off firewalld:
systemctl disable firewalld --now
If you wish to keep firewalld enabled, by default, the following rules are required:
firewall-cmd --permanent --add-port=6443/tcp #apiserver
firewall-cmd --permanent --zone=trusted --add-source=10.42.0.0/16 #pods
firewall-cmd --permanent --zone=trusted --add-source=10.43.0.0/16 #services
firewall-cmd --reload
Additional ports may need to be opened depending on your setup. See Inbound Rules for more information. If you change the default CIDR for pods or services, you will need to update the firewall rules accordingly.
If enabled, it is required to disable nm-cloud-setup and reboot the node:
systemctl disable nm-cloud-setup.service nm-cloud-setup.timer
reboot
Older Debian release may suffer from a known iptables bug. See Known Issues.
It is recommended to turn off ufw (uncomplicated firewall):
ufw disable
If you wish to keep ufw enabled, by default, the following rules are required:
ufw allow 6443/tcp #apiserver
ufw allow from 10.42.0.0/16 to any #pods
ufw allow from 10.43.0.0/16 to any #services
Additional ports may need to be opened depending on your setup. See Inbound Rules for more information. If you change the default CIDR for pods or services, you will need to update the firewall rules accordingly.
Raspberry Pi OS is Debian based, and may suffer from a known iptables bug. See Known Issues.
Standard Raspberry Pi OS installations do not start with cgroups
enabled. K3S needs cgroups
to start the systemd service. cgroups
can be enabled by appending cgroup_memory=1 cgroup_enable=memory
to /boot/cmdline.txt
.
Example cmdline.txt:
console=serial0,115200 console=tty1 root=PARTUUID=58b06195-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait cgroup_memory=1 cgroup_enable=memory
Starting with Ubuntu 21.10, vxlan support on Raspberry Pi has been moved into a separate kernel module.
sudo apt install linux-modules-extra-raspi
For more information on which OSs were tested with Rancher managed K3s clusters, refer to the Rancher support and maintenance terms.