Skip to content

K8s on RPI with Talos and Terraform

View repo

This repo is a fully working example of deploying a Kubernetes cluster to a handful of Raspberry Pi 4s. We use Talos for the OS and building the Kubernetes cluster. After the cluster is bootstraped, we use Terraform deploy various useful services onto the cluster.


At the end of this tutorial you'll have a fully working Kubernetes cluster with the following services configured and ready to use:

  • Talos - Minimal and hardened operating system and tools that deploy and manage kubernetes nodes/clusters.
    • Virtual (shared) IP address for the talos and Kubernetes endpoints
  • MetalLB - Load balancers using virtual/shared IPs
  • metrics-server - Provide metrics for Kubernetes autoscaling (e.g. horizontal pod autoscaler)
  • cert-manager - Automated TLS certificate management
  • Rook-Ceph - Distributed block, object and file storage
  • Prometheus - Monitoring and alerting
    • Full monitoring of your cluster! We gather metrics from just about every service that has them.
  • Loki - Log aggregation
  • Grafana - Visualize and explore metrics, logs and other data.
    • Since we use the kube-prometheus-stack helm chart a bunch of dashboards are pre-generated for you. We also automatically deploy dashboards for monitoring rook-ceph.
  • Alertmanager - Send Prometheus alerts to email, PagerDuty, etc.
  • Vertical Pod Autoscaler - Suggest or automatically adjust resource limits and requests for pods.

Helm Charts and Terraform Modules Used