Bare Metal Kubernetes Cluster
I created my own bare-metal kubernetes cluster with three Atomic Pi single board computers and a Mac Mini. Everything is running on Ubuntu 19, and I've deployed a variety of cloud-native services to the cluster. During setup, I used an Ansible playbook to automate configuration and setup of each node.
Services Deployed Locally
- Microservices Class Content
- MetalLB
- Local Path Provisioner
- Metrics Server
- Kubernetes Dashboard
- Linkerd
- Helm
- Prometheus, Grafana
- ELK Stack (Elasticsearch, Logstash, Kibana)
- OpenFaaS
- Locust Load Tester
Load Balancing and Storage
I'm using MetalLB to create a local load balancer instance. This allows me to deploy cloud native services on the cluster wihout much additional configuration. I have configured my router to reserve a range of IP addresses for the MetalLB controller to provide to load balanced services.
I'm using Local Path Provisioner from rancher to create persistent storage on the cluster. This mocks an S3 or Cloud Storage volume that would provide for any persistent volume claims.
Hardware
I started getting a major interest in Kubernetes this year, and decided to take an online course on microservices deployed through a k8s architecture. When I got to the cloud portion of the content, I decided to dive even deeper and set up my own local cluster.
I started first with an ARM based cluster, and had fairly good performance. However, as I wanted to deploy cloud native apps, I was spending most of my time hacking Dockerfiles instead of configuring and deploying services.
Atomic Pi is an x86-64 based single board computer that comes in at ~ $35 per node. With the correct architecture and low cost / node, I quickly ordered a few of these for the project. I set up each node with Ubuntu Server 19, assigned static IP addresses, and added ssh keys.
In addition to the hw/sw engineering, I custom designed the 'enclosure' for the cluster using FreeCAD. I 3D printed the enclosure using a color-change material that shifts between blue and white depending on the heat of the material.