Self-hosting

created: Mon, 29 Jul 2024 16:19:31 GMT, modified: Mon, 06 Jan 2025 00:07:38 GMT

Lightweight and fully functional Kubernetes environment that works anywhere.

Goals

  • deploy applications to the cluster, including lightweight development environment
  • expose applications to the world with TLS and domain names

Design

  • compute/storage on premises across multiple sites
  • cheap and disposable VPS to expose cluster services online

Hardware

  • Laptop Lenovo T460, i5-6200U, 16GB RAM, 200GB SSD, as primary master/worker node
  • Synology DS920+

Configuration steps

  • set up domain and name servers
  • set up Kubernetes cluster with K3s and Tailscale VPN
  • procure VPS or dedicated server
  • install and configure k3s agent
  • configure node monitoring
  • expose DS920+ NFS as storage class for persist storage
  • configure VPS node taints
  • install ingress-nginx, cert-manager and external-dns charts
  • configure external-dns to automatically update zone
  • configure ingress-nginx to use taints and tolerations
  • configure cert-manager to use public letsencrypt service
  • configure external monitors to watch domain names and nodes