Talos Cluster - Overview¶
The Talos Kubernetes cluster in my homelab is powered by a small fleet of Raspberry Pi devices. This setup combines the minimalism and security of Talos Linux with the versatility of Raspberry Pi, creating a lightweight, efficient, and manageable Kubernetes environment.
Talos Linux is Linux designed for Kubernetes - secure, immutable, and minimal.
By leveraging this cluster, I can experiment with Kubernetes deployments and maintain a dedicated, small-scale infrastructure for development and testing purposes.
This also provides a platform for some production-grade applications and services running in my homelab.
Context¶
Containers¶
The Talos Raspberry Pi Nodes are not provisioned by Ansible. They run the Talos variant for Raspberry Pi directly.
- Raspberry Pi 4: 8 GB RAM and 32 GB SD-Card
- Raspberry Pi 5: 8 GB RAM, Quad Core 2,4GHz and 128 GB SD-Card
Since Talos Linux is designed to be immutable and secure, there is no way and no need to provision the nodes with Ansible. Talos Linux is managed entirely through an API with talosctl
. So the Talos nodes are treated as some sort of appliance.
The setup features an Admin VM to avoid conflicts with other tool installations on the Ubuntu Workstations
. The Ubuntu Workstations
are used for everyday work, proof of concepts, and development. So there might run other Kuberenetes variants like minikube
. By establishing a dedicated Admin VM we avoid possible conflicts with e.g. kubectl
.
Stateless Cluster
The whole cluster is intended to be stateless. This means that no data is stored on any of the nodes. The only storage is the SD-Card which is used for the Talos OS itself. There are no external storage solutions.
Components¶
To deploy applications and services to the Talos Kubernetes Cluster, we use ArgoCD. ArgoCD is a GitOps tool that helps to manage all deployments, applications, and services in a GitOps way. Applications and services are **never directly deployed to the cluster (e.g. through kubectl
). Everything is managed by ArgoCD.
ArgoCD is set up with the help of the ArgoCD Autopilot. The Autopilot is a CLI tool that helps to set up ArgoCD with the best practices. It sets up all configurations and manifests inside a repository. The manifests are part of this repository.
Applications are organized in namespaces. The Base Component
applications are inside a dedicated namespace. Applications are inside their own namespaces.
Code / Configuration¶
According to our Development Guide, all code and configuration are stored in a Git repository. We treat everything as code.
Information about the replica count, resources, possible assignments to nodes, and other (kubernetes-related) configurations are part of the manifests config files.
Network Setup¶
All RasPi nodes that are running the Talos Cluster are connected to the switch via cable. The switch is connected to the wifi network through the repeater.
Requests from workstations and the management node are routed through the router to the RasPi nodes, so they still rely on WiFi. But the cluster nodes themselves should communicate with each other through the wired connection. For internet access, they too rely on the WiFi connection.
The Talos Raspberry Pi nodes should get their IP addresses from the router via DHCP. The router should assign the same IP address to the same device every time. This is not mandatory but recommended.
RasPi Rack Setup¶
The nodes are sorted in the rack as follows (top to bottom):
References / External Links¶
- Initial Setup of the Talos cluster took place with issue #19 Setting Up a 3-Node Talos Kubernetes Cluster in my Personal Homelab and Pull Request #24 Talos Kubernetes on Raspberry Pi cluster.