LCTRT

Posts

Setting up my K3S Cluster on Proxmox

After my week working with Docker, it’s now time to setup my initial Kubernetes cluster. I will be using k3s as it’s a nice lightweight kubernetes distribution.

The Virtual Machines

I am using my Proxmox machine for this, and my VM setup will look like this:

I’m keeping this lean on purpose to avoid having oversized nodes hiding my potential mistakes. Each node will be running on Unbuntu Server.

Using a local CA for SSL certificates

In my previous post, I explain how I created a private docker image registry. But without https support, this was marked as an insecure registry and each docker context then needed to be configured to accept it. The next step for my homelab setup is to add TLS (transport layer security) config. I will use mkcert to create a local CA to generate certificate for all my virtual machines.

What is the purpose of a certificate authority (CA)

A Certificate Authority act like a notary, they generate trusted certificates that will be held by the nodes in my system. I can use my laptop as a CA, since once the certificate is signed, the CA is not needed again (until I need to generate new certificates of course).

Running a private registry for docker images

One adition I wanted on my setup was to be able to push the images I build on a private registry. This is useful now with my docker compose setup but I expect it will stay useful with Kubernetes.

Thankfully it’s quite easy to do, with a few caveats. There’s a registry image on docker hub, so that’s what I used in:

# docker-compose.yaml
services:
  registry:
    image: registry:3.0
    restart: unless-stopped
    ports:
      - "5000:5000"

As I said, there’s one caveat: docker will reject insecure (http) registries by default. So it’s required to update the docker daemon config (~/.docker/daemon.json or /etc/docker/daemon.json depending on your setup) to add our new registry in the list of allowed insecure registries:

Using Docker Compose on a Proxmox VM

Before getting deeper in my Kubernetes studies, I took some time to get back into the container fundamentals with Docker and Docker Compose. Since I have a Proxmox setup I made a dedicated VM for this process. Here’s what I had to do, from start to finish.

Create a new Proxmox VM

After setting up the vm, the first step was to install Ubuntu Server. I already have the ISO on Proxmox, and it’s an easy install. After that I had to make it accessible through ssh which is 2 main steps: adding the QEMU agent, then adding my ssh key.

Homelab: Proxmox or Kubernetes?

TLDR: I will use both tools to combine virtualization and containers.

As I have been restarting my homelab project, I have a lot of choices to make. I will try to document them here, as it might be useful for some, and definitely useful for future me (hello, future me!).

Last iteration, I wanted to have few beefy and well isolated applications, so Proxmox was the ideal choice on just one machine. Now the goal is slightly different. I mostly want a place to self host many smaller tools and websites, and I want to use that as a place to practice my devops knowledge.

My Past in Devops

I started learning some modern devops tools and practices recently. I heard someone say that it’s important to not just learn the “how” but also the “why” of technology. That’s something I can relate to, learning something just because it’s shiny is fun, but hard to sustain if there’s no compelling case for using it. Since devops is not my first tech work I have some pain points I already know I want to solve. After more than a decade in software engineering, I want to explore new skills and challenge myself. While doing that I’ve been thinking about my past experience in devops adjacent tasks. Why not have a little retrospective?

Hello, New Blog

Ok, so. I have a few drafts I need to edit. I want to have a website before I finalize them. But I don’t have anything ready to publish.

To solve that chicken and egg problem, here’s a simple post.

Hello Everyone.