π ~1 min read
Table of contents
Symptom & Impact
Kubelet fails startup with swap enabled errors, making node unusable.
Environment & Reproduction
Can happen after cloud-init, fstab edits, or image rehydration.
swapon --show
sudo systemctl status kubelet
cat /etc/fstab
Root Cause Analysis
Swap devices become active at boot while cluster policy requires swap disabled.
Quick Triage
Confirm active swap and kubelet error messages.
swapon --show
sudo journalctl -u kubelet -n 80
free -h
Step-by-Step Diagnosis
Locate swap activation source in fstab or cloud-init.
grep -E 'swap' /etc/fstab
grep -R swap /etc/cloud -n
lsblk -f

Solution – Primary Fix
Disable active swap and remove persistent swap entries.
Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.
sudo swapoff -a
sudo sed -i.bak '/sswaps/s/^/#/' /etc/fstab
sudo systemctl restart kubelet

Solution – Alternative Approaches
If swap must stay, configure workload policies outside strict kubelet defaults.
sudo kubelet --help | grep -i swap
Verification & Acceptance Criteria
No active swap remains and kubelet node status is healthy.
swapon --show
kubectl get nodes
sudo systemctl is-active kubelet
Rollback Plan
Restore fstab backup and reactivate swap if non-Kubernetes workload needs it.
sudo cp /etc/fstab.bak /etc/fstab
sudo swapon -a
Prevention & Hardening
Enforce swap policy in image build and boot validation checks.
grep -E 'swap' /etc/fstab
systemctl is-enabled kubelet
Related Errors & Cross-Refs
Related to cgroup mismatch, kubeadm preflight failures, and OOM behavior changes.
Related tutorial: View the step-by-step tutorial for Ubuntu 26.04 LTS.
View all Ubuntu 26.04 LTS tutorials on the Tutorials Hub β
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
Ubuntu Kubernetes node prep guidance and swap configuration notes.
Need Expert Help?
If you cannot resolve this yourself, our team offers hands-on Server Management, Managed IT Services, and flexible Support Plans. Contact us today β we respond within one business day.