# How to Run Kubernetes Locally Without Docker Desktop (Using k0s)

Running Kubernetes locally is often associated with tools like **Docker Desktop**, **Minikube**, or **kind**. But maybe:

* You **don’t want to use Docker Desktop** (licensing / performance / fallback reasons)
    
* You want something **lightweight and production-like**
    
* You want **full Kubernetes**, not a simplified local version
    

This is where **k0s** comes in.  
It’s a **zero-friction Kubernetes distribution**, batteries included, simple to install, and works great for learning, testing, or small homelabs.

## **Why Avoid Docker Desktop?**

Not hating Docker Desktop is convenient, but:

| Reason | Explanation |
| --- | --- |
| **High Resource Usage** | It runs background services and a full Linux VM. |
| **License Restrictions** | Organizations often need paid licenses. |
| **Not Ideal for K8s Learning** | Hides key networking and runtime internals. |

If you want a **real Kubernetes cluster feel** with **very low overhead**, **k0s** and **k3s** are great fits.

## **Which One Should You Use?**

| Feature | **k0s** | **k3s** |
| --- | --- | --- |
| Purpose | Cloud-native single-node or production cluster | Edge computing + lightweight IoT |
| Runtime | containerd built-in | containerd (default) |
| Install | Extremely simple | Also simple |
| Good for | Developers + homelabs | Small clusters, ARM boards, edge setups |

**In this tutorial, we will use** `k0s` because it’s very clean and runs well on macOS via virtualization.

## **Prerequisites**

You can follow this guide on any of the following:

| Platform | Setup Required |
| --- | --- |
| Linux (Ubuntu / Debian / Fedora etc.) | You’re good, install directly |
| macOS | Run an **Ubuntu VM** (UTM / Parallels / VMware / QEMU) |
| Windows | Run **Ubuntu in WSL2 or a VM** |

> **Important:** k0s runs on **Linux**, but you can still control the cluster from macOS/Windows using `kubectl`.

## Step 1: Install k0s

Inside your **Linux environment (or VM)** run:

```yaml
sudo apt update && sudo apt install curl -y
curl -sSLf https://get.k0s.sh | sudo bash
```

Verify:

```yaml
k0s version
```

---

## Step 2: Create a Single-Node Kubernetes Cluster

```yaml
sudo k0s install controller --single
```

Start it:

```yaml
sudo k0s start
```

Check status:

```yaml
k0s status
```

---

## Step 3: Enable kubectl Access

Create the kubeconfig:

```yaml
mkdir -p ~/.kube
sudo k0s kubeconfig admin > ~/.kube/config
chmod 600 ~/.kube/config
```

Test Kubernetes:

```yaml
kubectl get nodes
```

You should see something like:

```yaml
NAME       STATUS   ROLES           AGE   VERSION
k0s-node   Ready    control-plane   30s   v1.30.x
```

You now have Kubernetes running without Docker Desktop!

---

## Why This Setup Is Great

| Feature | k0s Benefit |
| --- | --- |
| Lightweight | Uses less RAM/CPU than Docker Desktop or MicroK8s |
| Simpler | One binary installs everything |
| Real Kubernetes | Not a simulation like kind/minikube |
| Cloud-ready | Same config can run on servers later |

---

## **Conclusion**

You don’t need Docker Desktop to run Kubernetes locally.

Just:

1. Use Linux (or run Linux in a VM)
    
2. Install **k0s**
    
3. Start your cluster
    
4. Use `kubectl` like normal
    

You now have a **full Kubernetes environment** ready for:

* Local development
    
* CI testing
    
* Homelab setups
    
* Learning & experimentation
