September 8th, 2024

[Deploying a basic React site pt 1] Setting up a self-hosted Kubernetes cluster

The article describes setting up a Kubernetes cluster on a home server to deploy a React application, utilizing Dynamic DNS, Cloudflare for security, and K3s for lightweight management.

Read original articleLink Icon
[Deploying a basic React site pt 1] Setting up a self-hosted Kubernetes cluster

The article outlines the process of setting up a Kubernetes cluster on a home server to deploy a basic React application. The author, motivated by a desire to over-engineer a simple task of splitting restaurant bills among friends, opts for a self-hosted solution rather than using cloud services. The setup begins with acquiring a refurbished HP Z2 Mini G3 workstation, installing Ubuntu Server, and configuring port forwarding on a home router to allow external access. The author implements Dynamic DNS (DDNS) to manage the changing IP address of the server and secures the setup using Cloudflare for DDoS protection and SSL/TLS encryption. A firewall is configured to restrict access to the server, allowing only traffic from Cloudflare's IP addresses. The lightweight K3s Kubernetes distribution is installed, and a sample application is deployed to test the configuration. The article concludes with a successful deployment of a simple application that serves "Hello, World!" and hints at future articles that will cover more advanced topics like ArgoCD and Keycloak SSO.

- The author sets up a Kubernetes cluster on a home server to deploy a React application.

- Dynamic DNS and Cloudflare are used for managing IP addresses and securing the setup.

- A firewall is configured to restrict access to the server.

- K3s is chosen for its lightweight and easy installation.

- The article serves as a guide for over-engineering simple tasks in software development.

Link Icon 9 comments
By @jett2 - 4 months
This is the first article in what will be a series of posts where I way overcomplicate the deployment of a simple React site for fun and to learn some of the more gnarly pieces of modern software development. Feel free to submit feedback, as I am by no means a professional technical writer
By @vanjajaja1 - 4 months
Post title made me laugh a little bit
By @sgarland - 4 months
> sudo kubectl delete namespace hello-world

I await with amusement the first time you discover the agony of finalizers.

By @mindcrash - 4 months
I'm missing CI/CD...

No love for Argo, Screwdriver, Tekton or Spinnaker?

You aren't deploying your simple React site to Kubernetes manually right? RIGHT?!?

By @doubtfuluser - 4 months
Thanks for doing this… I spat out coffee when I read the title and thought WTF. I really appreciated what you do here when I started reading it.

Well done.

By @doubtfuluser - 4 months
Don’t you think you should start compiling your own Linux before starting to setup the k8s cluster?
By @itohihiyt - 4 months
This title keeps landing body shots right up to the KO kubernetes cluster. Well done.
By @aaronbrethorst - 4 months
Holy cow, dude. I feel tired just reading that post's title!