# LXD vs Docker for Homelab

Why I chose LXD over Docker and VMs for my Kubernetes Homelab 🏗️☸️ ?  
  
I just set-up a 4-server k8s Homelab, and while my first choice was Docker for apps or Multi-pass/VMs for isolation, I went with LXD. Here’s why:  
  
1\. 𝗩𝗠'𝘀 are too "Expensive": Running 4 separate kernels wastes massive RAM.  
Layers: Physical hardware ➡ host OS ➡ Hypervisor(VMware) ➡ Guest OS  
2\. 𝗗𝗼𝗰𝗸𝗲𝗿 is too "Thin": K8s expects to manage a node, not just a process. Docker-in-docker lacks the systemd init and robust networking required for a stable kubeadm environment.  
Layers: Physical hardware ➡ host OS Kernel (shared) ➡ Docker Engine  
  
The 𝗟𝗫𝗗 effect:  
Layers: Physical hardware ➡ host OS Kernel (shared) ➡ LXD ➡ Full Guest OS  
✅ Real Nodes: Each node has its own users, cron daemon, IP, storage, and systemd—essential for practicing kubeadm deployments.  
✅ Instant Snapshots: I can snapshot the entire cluster before a risky kubectl upgrade and revert in seconds.  
✅ Efficiency: I’m running a full 4-node cluster with less overhead than a single heavy Windows VM.  
  
You can follow my journey through this repository: [**https://lnkd.in/g5U-VZ7t**](https://lnkd.in/g5U-VZ7t)  
[**prakyath.dev**](http://prakyath.dev/)  
[**#Kubernetes**](https://www.linkedin.com/search/results/all/?keywords=%23kubernetes&origin=HASH_TAG_FROM_FEED) [**#K8s**](https://www.linkedin.com/search/results/all/?keywords=%23k8s&origin=HASH_TAG_FROM_FEED) [**#LXD**](https://www.linkedin.com/search/results/all/?keywords=%23lxd&origin=HASH_TAG_FROM_FEED) [**#CloudNative**](https://www.linkedin.com/search/results/all/?keywords=%23cloudnative&origin=HASH_TAG_FROM_FEED) [**#Homelab**](https://www.linkedin.com/search/results/all/?keywords=%23homelab&origin=HASH_TAG_FROM_FEED) [**#Ubuntu**](https://www.linkedin.com/search/results/all/?keywords=%23ubuntu&origin=HASH_TAG_FROM_FEED) [**#DevOps**](https://www.linkedin.com/search/results/all/?keywords=%23devops&origin=HASH_TAG_FROM_FEED) [**#LinuxContainers**](https://www.linkedin.com/search/results/all/?keywords=%23linuxcontainers&origin=HASH_TAG_FROM_FEED)

LinkedIn: [https://www.linkedin.com/posts/prakyath-reddy-k\_kubernetes-k8s-lxd-activity-7422489779583488000-f2gP?utm\_source=share&utm\_medium=member\_desktop&rcm=ACoAACMLB3QBbJrDnMx5HudIT1V1XUhI362E08o](https://www.linkedin.com/posts/prakyath-reddy-k_kubernetes-k8s-lxd-activity-7422489779583488000-f2gP?utm_source=share&utm_medium=member_desktop&rcm=ACoAACMLB3QBbJrDnMx5HudIT1V1XUhI362E08o)
