How to Install K3s on Ubuntu

Posted by NetworkWhois on
Hey there! After spending countless hours working with various Kubernetes distributions, I've found K3s to be a game-changer for my development workflow. Today, I'll walk you through setting up K3s on Ubuntu, based on my personal experience as a DevOps engineer.
Why K3s Caught My Attention
When I first started working with Kubernetes, the complexity almost made me give up. Then I discovered K3s, and honestly, it's been a breath of fresh air. Here's what made me stick with it:
💡 Pro Tip: K3s is perfect if you're running a home lab or working on resource-constrained environments. I've successfully run it on my old laptop with just 4GB RAM!
What Makes K3s Special?
From my hands-on experience, these features really stand out:
1. It's Surprisingly Lightweight
Unlike regular Kubernetes that felt like trying to fit an elephant in a mini cooper, K3s is impressively compact. I've seen it run smoothly on machines where standard K8s wouldn't even install.
2. Lightning-Fast Setup
Remember spending days setting up a Kubernetes cluster? With K3s, I can get a cluster running during my coffee break. No kidding!
Before You Start: System Requirements
Based on my testing, you'll need:
- Ubuntu 23 (obviously!)
- At least 512MB RAM (though 1GB is more comfortable)
- 1 CPU core minimum
- Root or sudo access
Installation Steps
First, let's get our system up to date. I always start with this to avoid any weird dependency issues:
sudo apt update sudo apt upgrade -y

Now, here's the magic one-liner that got K3s running on my system:
curl -sfL https://get.k3s.io | sudo bash -
🔧 If you're like me and prefer checking what you're installing, you can download the script first:
curl -sfL https://get.k3s.io -o install-k3s.sh sudo chmod +x install-k3s.sh sudo ./install-k3s.sh

Verifying Your Installation
After installation, I always run these commands to make sure everything's working:
sudo systemctl status k3s kubectl get nodes


If you see your node listed as 'Ready', congratulations! You've got K3s running.
Setting Up Your Kubeconfig
To make your life easier, configure kubectl access:
mkdir -p ~/.kube sudo cp /etc/rancher/k3s/k3s.yaml ~/.kube/config sudo chown $(id -u):$(id -g) ~/.kube/config
Troubleshooting Tips
In my journey with K3s, I've hit a few snags. Here's what helped me:
- If K3s fails to start, check the logs:
sudo journalctl -u k3s -f
- Make sure nothing else is using port 6443
- Check if your firewall is blocking required ports
Final Thoughts
After using K3s in production for several months now, I can confidently say it's been one of the best decisions for our development environment. It's lightweight enough for testing but robust enough for serious workloads.
💡 Quick Tip: Keep an eye on the official K3s documentation for updates. The community is super active, and new features are added regularly!
Have you tried installing K3s on your system? I'd love to hear about your experience, send me an email.