Today I set up a Kubernetes cluster in my homelab โ€“ abbreviated K8s ๐Ÿ˜.

I’ve had some professional exposure to Kubernetes before, but I wanted to run a Nextcloud installation inside Kubernetes for testing purposes in my homelab ๐ŸŒ. Plus, I wanted to spend some personal time diving deeper into this tech ๐Ÿ’ป. Kubernetes and Docker in general are undeniably future tech ๐Ÿš€. The idea of pursuing the CKAD (Certified Kubernetes Application Developer) certification also really appeals to me, and I found this course on Udemy to get started: CKAD Udemy Course ๐ŸŽ“.


๐Ÿค” What is Kubernetes Anyway?

In short, Kubernetes is an open-source platform for automating the deployment, scaling, and management of containerized applications. It allows apps to run consistently across multiple servers while efficiently using resources โšก. Main benefits? Scalability, fault-tolerance, and simplified management of complex systems ๐Ÿ˜Ž.

Fun fact: Kubernetes was originally developed by Google and internally called Borg ๐Ÿ‘พ.

The Kubernetes logo is a ship’s steering wheel โš“, symbolizing the control of complex container landscapes. Interestingly, it has exactly seven spokes โ€“ a nod to the character Seven of Nine from the Borg universe ๐Ÿ‘ฝ. This little Easter egg inspired the featured image for this post ๐ŸŽจ.


๐Ÿ› ๏ธ My Setup

Today, I quickly generated an Ansible playbook using Claude.AI ๐Ÿค– that installed a Kubernetes cluster across 6 VMs in my homelab ๐Ÿ . On each of the 3 physical servers, I now run 2 VMs โ€“ one Master and one Worker. This serves as an initial cluster setup, and in the future I may add more Worker nodes for dedicated tasks, e.g., Longhorn storage ๐Ÿ—„๏ธ.

Note: Download link for the playbook: here โฌ‡๏ธ
( Iโ€™m not fully happy with this approach โ€“ ideally it would be an open Git repository ๐Ÿ™, but I havenโ€™t set that up yet ๐Ÿ˜…. )


โš ๏ธ First Hiccups

Before the cluster ran smoothly, I ran into a few issues ๐Ÿคฏ:

  • Initially, I allocated only 1 CPU core to the master node in Proxmox โ€“ Kubernetes actually needs multiple cores ๐Ÿง .
  • Ansible installed iptables only on the master, not on the worker nodes, causing the network stack to fail to start properly ๐ŸŒโŒ.

After fixing these, the cluster came up ๐ŸŸข and I could start deploying pods ๐Ÿณ.


๐Ÿ”ฎ Outlook

Next, I plan to deploy Nextcloud inside Kubernetes and test how storage, backups, and updates behave in a clustered environment ๐Ÿ’พ. This is a hands-on way to learn Kubernetes, Docker, and network management in a homelab ๐Ÿ–ฅ๏ธ โ€“ without risking production systems ๐Ÿšซโšก.


 

By raphael

Leave a Reply