Provisioning a Kubernetes Cluster with Talos Linux and Proxmox VE with OpenTofu

The whole story started for me when a colleague recommended Talos Linux for building a Kubernetes cluster on bare metal some weeks ago. He sent me a video from DHCP 2024 conference which dragged me into that topic (sorry for the German). I was amazed by that concept and immediately started to inhale the docs and related projects on GitHub.

Talos Linux is a special Linux distribution geared towards its only purpose which is providing a platform for Kubernetes. It comes with an API which can be utilized for provision and configure the OS installation and the Kubernetes cluster. That makes it an ideal partner for provisioning Tools like OpenTofu or Terraform. Consequently, there is no direct shell access to the Talos machines.

I like that infrastructure-as-code approach, so I started a proof of concept project with OpenTofu the next weekend. I already have Proxmox VE as hypervisor running in my home lab, so I spun up some virtual machines on that server using the Talos Linux iso image and used the Talos Terraform provider to provision the Kubernetes cluster.

I was absolutely amazed how easy that was. I just spent roughly three hours to put together this little POC project: https://github.com/max-pfeiffer/proxmox-talos-opentofu

I encourage everyone to give Talos Linux a shot and try it out.