
Fedora 45 was released on November 3, 2026, after slipping twice from its original October 20 target. It ships Linux 7.2, and its release notes confirm the final removal of cgroups v1, slirp4netns and the BoltDB backend. That makes it a good Kubernetes node OS if you want a recent kernel. It also removes some of the legacy baggage that used to cause odd kubelet behavior.
Most tutorials online still assume Ubuntu with Docker, an old swap trick and a copy-pasted iptables rule. They break on Fedora in small, irritating ways. SELinux blocks something. DNF5 rejects an option you’ve used for years. A zram swap device quietly returns after every reboot and kubelet refuses to start. Anyone who has built a cluster at 2 a.m. knows how that goes.
This guide builds a working single control plane cluster on Fedora 45 with kubeadm, CRI-O and Flannel, and it explains the reasoning behind each step. It also covers the firewall, SELinux, tuning and the failures that tend to show up in practice. The commands work on bare metal, on VMs, and on a cloud instance running Fedora.
One caution first. Fedora moves fast and its support window is short. That suits labs, edge nodes, development clusters and teams that patch constantly. If you need five years of boring stability, AlmaLinux or Rocky is the better base. For everything else, read on.
What You Need Before Starting
Plan the hardware and network first. Most failed installs trace back to a wrong assumption made here.
| Component | Minimum | Comfortable for real work |
|---|---|---|
| Control plane CPU | 2 vCPU | 4 vCPU |
| Control plane RAM | 2 GB | 4 to 8 GB |
| Worker CPU and RAM | 2 vCPU, 2 GB | Sized to your workloads |
| Disk | 20 GB | 50 GB or more on SSD or NVMe |
| Network | Static IPs, nodes reach each other | Dedicated NIC or VLAN for node traffic |
You also need:
- Fedora 45 Server or a minimal install on every node, with sudo access.
- A unique hostname, MAC address and product UUID per node. Cloned VMs often violate this, and the cluster misbehaves in strange ways when they do.
- Internet access to the Fedora mirrors,
pkgs.k8s.ioandregistry.k8s.io. - Time sync. Fedora ships chrony, and etcd is unforgiving about clock drift.
The examples use three nodes:
| Hostname | Role | IP |
|---|---|---|
| k8s-cp1 | Control plane | 192.168.10.11 |
| k8s-w1 | Worker | 192.168.10.21 |
| k8s-w2 | Worker | 192.168.10.22 |
Swap in your own addresses. Run every command in “All nodes” sections on every machine, and the control plane sections only on the control plane.
Choosing Your Runtime and Package Source
Two decisions shape the rest of the install.
Container runtime: CRI-O or containerd
Kubernetes talks to runtimes through the Container Runtime Interface, and kubeadm needs a CRI endpoint it can reach. CRI-O listens at unix:///var/run/crio/crio.sock. Both CRI-O and containerd are solid. CRI-O is packaged in Fedora’s own repositories and the Fedora quick-docs use it as their example. It tracks Kubernetes minor versions one to one, which keeps version planning simple. This guide uses CRI-O.
Package source: Fedora repos or pkgs.k8s.io
Fedora packages Kubernetes as versioned modules, such as kubernetes1.35 for Fedora 44. The Fedora documentation shows the same pattern for the older 1.31 release. The other route is the community-owned repository at pkgs.k8s.io, which publishes DEB and RPM packages per minor version. The upstream Kubernetes project documents it for Fedora, and it lets you pick the minor release you want. The current upstream release is v1.37.
This guide uses the upstream repository, because it gives you the newest minor version and matches the official kubeadm documentation. Before you commit, run dnf list 'kubernetes1.*' on a Fedora 45 box. If Fedora already carries the version you want, the native packages avoid managing a third-party repo.
Whichever source you pick, the rule is the same. Pin the minor version. A casual dnf upgrade should never move a node across a Kubernetes minor release, because upgrades follow their own procedure.
Step 1: Prepare Every Node
These steps apply to all nodes.
Set hostnames and name resolution
sudo hostnamectl set-hostname k8s-cp1 # change per node
Add all nodes to /etc/hosts so the cluster doesn’t depend on DNS being healthy at bootstrap:
sudo tee -a /etc/hosts <<'EOF'
192.168.10.11 k8s-cp1
192.168.10.21 k8s-w1
192.168.10.22 k8s-w2
EOF
Update the system
sudo dnf upgrade --refresh -y
sudo reboot
Reboot even when it feels unnecessary. A fresh kernel and matching modules avoid a whole category of “module not found” confusion later.
Confirm unique identifiers
ip link show | grep link/ether
sudo cat /sys/class/dmi/id/product_uuid
Compare the output across nodes. Duplicates mean cloned images, and the fix is to regenerate them before going further.
Disable swap, including zram
Kubelet fails by default when swap is active. Fedora complicates this because it enables swap on zram through zram-generator-defaults. Turning swap off once with swapoff -a isn’t enough, because zram comes back on the next boot. The Fedora Magazine walkthrough for CRI-O removes that package for this reason.
sudo dnf remove -y zram-generator-defaults
sudo swapoff -a
sudo sed -i '/\sswap\s/s/^/#/' /etc/fstab
Verify after a reboot:
swapon --show
free -h
If swapon --show prints nothing, you’re clean. Kubernetes does have swap support for specific configurations, but defaults and most production guidance still lean toward no swap. Memory limits stay predictable that way.
Load kernel modules
Pod networking needs overlay and br_netfilter:
sudo tee /etc/modules-load.d/k8s.conf <<'EOF'
overlay
br_netfilter
EOF
sudo modprobe overlay
sudo modprobe br_netfilter
Apply sysctl settings
sudo tee /etc/sysctl.d/99-kubernetes.conf <<'EOF'
net.bridge.bridge-nf-call-iptables = 1
net.bridge.bridge-nf-call-ip6tables = 1
net.ipv4.ip_forward = 1
EOF
sudo sysctl --system
Without ip_forward, pods on different nodes can’t talk to each other. Without the bridge settings, traffic between pods on the same node skips the filtering rules that Services depend on.
Check cgroups
Fedora 45 completes the move to cgroups v2, and the release notes say v1 support is finally removed. That’s good news, since the kubelet and the runtime now agree on one hierarchy. Confirm it:
stat -fc %T /sys/fs/cgroup
The expected output is cgroup2fs. Anything else on Fedora 45 deserves investigation before you continue.
Step 2: Handle SELinux and the Firewall
Many guides tell you to run setenforce 0 and move on. Don’t. SELinux on Fedora is mature, and container-selinux ships policies built for exactly this workload. Keep it enforcing:
getenforce
sudo dnf install -y container-selinux iproute-tc
iproute-tc provides the tc utility. kubeadm’s preflight checks warn if it’s missing.
Now the firewall. You can run a cluster with firewalld disabled in a lab, but production nodes should keep it on and open only what’s needed.
Control plane node:
sudo firewall-cmd --permanent --add-port=6443/tcp
sudo firewall-cmd --permanent --add-port=2379-2380/tcp
sudo firewall-cmd --permanent --add-port=10250/tcp
sudo firewall-cmd --permanent --add-port=10257/tcp
sudo firewall-cmd --permanent --add-port=10259/tcp
sudo firewall-cmd --permanent --add-port=8472/udp
sudo firewall-cmd --reload
Worker nodes:
sudo firewall-cmd --permanent --add-port=10250/tcp
sudo firewall-cmd --permanent --add-port=10256/tcp
sudo firewall-cmd --permanent --add-port=30000-32767/tcp
sudo firewall-cmd --permanent --add-port=8472/udp
sudo firewall-cmd --reload
Port 8472/udp carries Flannel’s VXLAN traffic. If you pick another CNI, check its documentation, because the data plane ports differ. In real environments, restrict 6443 and 10250 to your node subnet and admin network with rich rules or zones instead of opening them to the world.
Step 3: Install CRI-O
Find which CRI-O packages Fedora offers:
dnf list 'cri-o*'
Install the one that matches your target Kubernetes minor version. The version suffix pattern comes from the Fedora docs, which install a CRI-O package matching the Kubernetes version. For example, with a 1.37 target:
sudo dnf install -y cri-o1.37 cri-tools containernetworking-plugins
If that exact package name doesn’t exist yet, the unversioned cri-o package is the fallback. CRI-O’s own site also documents installing it from its own repositories if Fedora lags behind. The project guidance is to keep the runtime on the same minor version as Kubernetes.
Enable and start it:
sudo systemctl enable --now crio
sudo systemctl status crio --no-pager
Confirm the socket exists:
ls -l /var/run/crio/crio.sock
sudo crictl --runtime-endpoint unix:///var/run/crio/crio.sock info | head
A note on Podman changes. Fedora 45 ships Podman 6.1, which finished the shift to Netavark, Pasta, nftables and cgroups v2. None of that touches CRI-O directly. If you also use Podman on these hosts for builds or debugging, expect its behavior to differ from the old tutorials, and migrate any manual iptables container rules.
Step 4: Install kubeadm, kubelet and kubectl
Add the upstream repository. Change v1.37 to the minor release you want. Each minor version has its own repo path, so you opt in deliberately.
sudo tee /etc/yum.repos.d/kubernetes.repo <<'EOF'
[kubernetes]
name=Kubernetes
baseurl=https://pkgs.k8s.io/core:/stable:/v1.37/rpm/
enabled=1
gpgcheck=1
gpgkey=https://pkgs.k8s.io/core:/stable:/v1.37/rpm/repodata/repomd.xml.key
exclude=kubelet kubeadm kubectl cri-tools kubernetes-cni
EOF
The exclude line is intentional. It stops routine system updates from moving the cluster components, because Kubernetes upgrades need a special procedure.
Fedora 45 uses DNF5, which changes the override option. Upstream documents the DNF5 form for Fedora systems.
sudo dnf install -y kubelet kubeadm kubectl --setopt=disable_excludes=kubernetes
sudo systemctl enable kubelet
Don’t start kubelet manually yet. Until kubeadm init or kubeadm join runs, kubelet restarts every few seconds because it has no configuration. That’s expected behavior and not a fault.
Check the versions:
kubeadm version -o short
kubectl version --client
If you went with Fedora’s packaged builds instead, the equivalent install is dnf install kubernetes1.XX kubernetes1.XX-kubeadm kubernetes1.XX-client, plus dnf versionlock to hold the minor version while still allowing patch updates.
Step 5: Initialize the Control Plane
Run this only on k8s-cp1.
First, pre-pull the images. It moves the slow part before the part where timeouts hurt:
sudo kubeadm config images pull
Then bootstrap with a config file. It’s better than a long command line because you can store it in Git and reuse it:
cat <<'EOF' | sudo tee kubeadm-config.yaml
apiVersion: kubeadm.k8s.io/v1beta4
kind: InitConfiguration
localAPIEndpoint:
advertiseAddress: 192.168.10.11
bindPort: 6443
nodeRegistration:
criSocket: unix:///var/run/crio/crio.sock
name: k8s-cp1
---
apiVersion: kubeadm.k8s.io/v1beta4
kind: ClusterConfiguration
networking:
podSubnet: 10.244.0.0/16
serviceSubnet: 10.96.0.0/12
controlPlaneEndpoint: "k8s-cp1:6443"
---
apiVersion: kubelet.config.k8s.io/v1beta1
kind: KubeletConfiguration
cgroupDriver: systemd
EOF
sudo kubeadm init --config kubeadm-config.yaml
If your kubeadm release complains about the config API version, run kubeadm config print init-defaults to see the current one and adjust.
Two choices here matter. The pod subnet must not overlap your node network, your VPN ranges or any corporate subnet. Changing it later is painful. And controlPlaneEndpoint should point to a stable name even for a single control plane. If you grow to a highly available setup, you will be glad it was never an IP tied to one machine.
When init finishes, set up kubectl for your regular user:
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
kubectl get nodes
The node will show NotReady. That’s normal until a network plugin is installed.
Step 6: Install a Pod Network
Kubernetes doesn’t ship with pod networking. Flannel is the lightest way to get a cluster running, and it suits labs and modest clusters:
kubectl apply -f https://github.com/flannel-io/flannel/releases/latest/download/kube-flannel.yml
kubectl -n kube-flannel get pods -w
Within a minute or two the node should turn Ready, and CoreDNS pods move from Pending to Running.
How should you choose a CNI? Flannel is simple but has no network policy support. If you need NetworkPolicy for tenant isolation or compliance, use Calico or Cilium from the start. Swapping the CNI on a running cluster is possible but disruptive. Cilium is attractive on a modern kernel like the one Fedora 45 ships, since its eBPF features benefit from recent kernels. Read its Fedora and firewalld notes before choosing it, because its port requirements differ.
Step 7: Join the Worker Nodes
On the control plane, print a fresh join command:
sudo kubeadm token create --print-join-command
Run the output on each worker with sudo. It looks like this:
sudo kubeadm join k8s-cp1:6443 --token <token> \
--discovery-token-ca-cert-hash sha256:<hash> \
--cri-socket unix:///var/run/crio/crio.sock
Back on the control plane:
kubectl get nodes -o wide
All three nodes should report Ready. Tokens expire after 24 hours by default, which is a good thing. Create a new one when you need it instead of extending the lifetime.
Label the workers so kubectl get nodes reads cleanly:
kubectl label node k8s-w1 node-role.kubernetes.io/worker=
kubectl label node k8s-w2 node-role.kubernetes.io/worker=
Step 8: Verify With a Real Workload
A Ready node proves less than people assume. Test scheduling, networking, DNS and service routing in one pass:
kubectl create deployment web --image=nginx:stable --replicas=3
kubectl expose deployment web --port=80 --type=NodePort
kubectl get pods -o wide
kubectl get svc web
Then test from outside the cluster against a worker IP and the NodePort:
curl -I http://192.168.10.21:<nodeport>
And test DNS from inside:
kubectl run dns-test --rm -it --image=busybox:stable --restart=Never -- nslookup kubernetes.default
If the pods are spread across nodes, the NodePort answers, and the lookup resolves, the cluster is healthy. Delete the test resources afterward:
kubectl delete svc web && kubectl delete deployment web
Troubleshooting Common Errors
These are the failures that appear most often on Fedora, in rough order of frequency.
Kubelet keeps crashing with a swap error
The message says the kubelet is running with swap on. Check swapon --show. Nine times out of ten it’s zram that returned after a reboot. Confirm zram-generator-defaults is removed, then rerun swapoff -a. Disable any other .swap units with systemctl --type swap.
kubeadm init fails preflight on br_netfilter or ip_forward
The error references /proc/sys/net/bridge/bridge-nf-call-iptables or ip_forward. Reload the module and sysctl files from Step 1. Check with lsmod | grep br_netfilter and sysctl net.ipv4.ip_forward.
DNF5 rejects –disableexcludes
The older option belongs to DNF4. On Fedora 45 use --setopt=disable_excludes=kubernetes, as the upstream docs specify for DNF5 systems.
“nothing provides kubernetes-cni needed by kubelet”
This dependency error was reported on the upstream RPM repo for one specific release when the packaging lagged. The fix usually arrives upstream within days. Meanwhile, try the previous patch release, or switch to Fedora’s own packaged Kubernetes build.
Node stays NotReady after joining
Check the CNI first:
kubectl -n kube-flannel get pods -o wide
journalctl -u kubelet -n 100 --no-pager
Look for a missing /etc/cni/net.d config or a pod CIDR mismatch. If you used a pod subnet other than 10.244.0.0/16, edit Flannel’s ConfigMap to match.
Pods can’t reach each other across nodes
Blame the firewall before anything else. Verify UDP 8472 is open on all nodes, and test with ping between pod IPs on different workers. Confirm net.ipv4.ip_forward is still 1 after reboot.
CoreDNS pods stuck in CrashLoopBackOff
A loop with the host’s resolver is the classic cause, particularly when /etc/resolv.conf points to a local stub resolver like 127.0.0.53. Fedora uses systemd-resolved, so point the kubelet at the real file:
sudo ls -l /etc/resolv.conf
# set resolvConf: /run/systemd/resolve/resolv.conf in the KubeletConfiguration if needed
Permission denied errors in container logs
That’s SELinux. Don’t turn it off. Check with sudo ausearch -m avc -ts recent and look at the denied path. Most hostPath volume issues are fixed by relabeling the directory with chcon -Rt container_file_t /path, or by using the :Z option where it applies. For persistent paths use semanage fcontext so the label survives a relabel.
Cgroup driver mismatch
If kubelet and CRI-O disagree (systemd versus cgroupfs), pods fail to start with confusing errors. CRI-O defaults to systemd on modern setups, and the config above sets the kubelet to match. Check /etc/crio/crio.conf.d/ for a cgroup_manager override if you suspect drift.
Init fails with a timeout waiting for the control plane
Check sudo crictl ps -a and journalctl -u crio -u kubelet. A common culprit is a failed image pull from registry.k8s.io behind a proxy. Configure the proxy for CRI-O through a systemd drop-in and restart the service.