This section includes all the documentation of my home server configuration and deployments of apps. If you're starting your own homelab with Kubernetes and Terraform, be sure to read the more detailed pages about these tools as well.
My home server uses Kubernetes as an orchestration system for all the containers. Since Kubernetes supports Docker containers, it makes it accessible to one of the largest ecosystem of open-source apps, and is secure, scalable and has loads of additional features to manage a large homelab.
For more information on Kubernetes and why I chose it, see Kubernetes.
K3s is Rancher's lightweight Kubernetes that comes with all the features you need, and is optimized to run on low-power systems such as Raspberry Pis or lower-end Intel NUCs. It also comes with some built-in software such as Traefik as a reverse proxy and Rancher's local-path
provisioner and Helm controller, providing a good base to get started with Kubernetes.
For more information on K3s and why I chose it, see K3s.
Terraform is HashiCorp's infrastructure as code (IaC) solution, that allows users to create reusable infrastructure modules that deploy infrastructure to platforms such as Kubernetes, Docker, AWS and Azure.
Thanks to the built-in state management, you can modify your configuration from anywhere, and run updates through a CI/CD pipeline without worrying about change management. Similar to how Kubernetes handles changes to manifests with kubectl apply
, Terraform can do this for a broader set of infrastructure without vendor lock-in.
For more information on Terraform and why I chose it, see Terraform.
Terraform isn't the only way to deploy containers and services to Kubernetes. You can use Kustomize manifests, Helm charts, or just plain Kubernetes manifests to configure your infrastructure. These strategies are also supported by GitOps systems such as ArgoCD and Flux, which is a Kubernetes-native method to apply configuration changes to your cluster.
The benefit of using Terraform is its portability. But if you want to use one of the alternatives, it's still worth looking at the Terraform modules, since they can be translated easily to Kubernetes or Kustomize manifests. Many popular applications also come with Helm charts, which can be configured using Rancher's Helm chart controller that K3s ships with.
K3s comes with Traefik as a reverse-proxy, and configures the LoadBalancer
on port :80
and :443
to handle both HTTP and HTTP/S traffic. We can use Traefik to expose services under their own hostname by adding DNS entries pointing to your public IP address, and adding a Kubernetes Ingress to handle requests.
Traefik also comes with support for Let's Encrypt certificates, and Tailscale, out of the box.
For more information on Traefik and why I chose it, see Traefik.