⚠️ I am still working on this project. I'll release the services as soon as it's done
- 3 Raspberry Pi 4, 4Gb each
- 1 Raspberry Pi 4, 8Gb
- 4 Micro SDXC SanDisk 128Gb each (64Gb will be enough as well)
- 4 Cables Ugreen USB C to USB A
- 1 Micro-HDMI to standard HDMI
- 1 GeeekPi Rack Tower 4 Layer Acrylic Cluster Case Large Cooling Fan LED RGB Light.
- 1 Anker 60W 6-Port USB Wall Charger, amazon link
-
The first step is to install the OS, for this project I'd choose Ubuntu Server 20.04.3 LTS. Step by step is here.
-
Install Ansible on your local computer.
-
Install
sshpass
on MAC
brew install hudochenkov/sshpass/sshpass
As specified on the official documentation, we can set up the wifi connection by modifying the file network-config
.
Cluster IP addresses.
Hostname | IP Address |
---|---|
rpi-k8s-master | 192.168.1.123 |
rpi-k8s-node-1 | 192.168.1.164 |
rpi-k8s-node-2 | 192.168.1.111 |
rpi-k8s-storage | 192.168.1.175 |
Also, as I set up the Rpi to not use a static IP address, once the devices got the respective IPs, I bound this to each respective MAC Address on my router.
The Inventory hosts file needs to be updated with the Rpi Ip address.
The file is located at /inventory/hosts
[all:vars]
ansible_connection=ssh
ansible_user=ubuntu
ansible_ssh_pass=Y8WJq84Y #your ubuntu password
[master]
rpi-k8s-master ansible_host=192.168.1.123
[nodes]
rpi-k8s-node-1 ansible_host=192.168.1.164
rpi-k8s-node-2 ansible_host=192.168.1.111
[storage]
rpi-k8s-storage ansible_host=192.168.1.175
This file contains information to be used on K8s services. Update it accordingly.
IpAddress:
k8s_master: 192.168.1.123
k8s_node_1: 192.168.1.164
k8s_node_2: 192.168.1.111
k8s_storage: 192.168.1.175
K8s:
cluster_name: cluster-rpi-lessandro
podSubnet: "10.244.0.0/16"
version: 1.22.0-00 #Kubernetes version to be installed
AWS:
HOSTED_ZONE_ID: ABCDE #Your Route53 Zone Id - K8s Dynamic DNS Services
VPN_NAME: example.com #Your public record - K8s Dynamic DNS Services
default_region: ap-southeast-2 #Your default AWS Region
⚠️ Make sure you read the documentation before deploying the applications.
Name | URL | Username | Password | Documentation |
---|---|---|---|---|
Linkerd | http://192.168.1.164:32100 | N/A | N/A | link |
Kubernetes Dashboard | https://192.168.1.164:32200 | N/A | N/A | link |
Dynamic DNS | N/A | N/A | N/A | link |
Wireguard | N/A | N/A | N/A | link |
NFS Server | N/A | N/A | N/A | link |
Jenkins & Trivy | http://192.168.1.164:32000 | admin | P@ssw0rd | link |
Pi-hole | http://192.168.1.164:8000 | admin | link | |
Grafana | http://192.168.1.164:32000 | admin | admin | link |
Prometheus | http://192.168.1.164:32090 | N/A | N/A | link |
Alertmanager | http://192.168.1.164:32093 | N/A | N/A | link |
Run the below Ansible playbook command.
ansible-playbook deploy
It'll deploy the services and applications specified on deploy.yml
file.
Raspberry Pi
Case