Loading...
Works

Raspberry Pi cluster 2021

  • Multi-server orchestration (with Ansible)
  • Load balancing (with Nginx)
  • Cluster container orchestration (with Kubernetes)

Setup: - Figure out the IP address of each of your Pi’s (through each one manually, using your routers web page, run Nmap -sP [networks IP] or run arp -an). - Connect to each of your Pi’s using SSH (ssh pi@[IP-ADDRESS]). - Update your Pi’s, run Raspi-config to change password, expand filesystem and set overclocking. - Physically attach the Pi’s to the cluster case and mount all the necessairy cables and cooling equipement.

Run Ansible PLaybooks availabe on my Github page to continue the tutorial. Some Usefull Ansible commands would be : # Get current disk usage. $ ansible all -i inventory -a "df -h" # Get current memory usage. $ ansible all -i inventory -a "free -m" # Reboot all the Pis. $ ansible all -i inventory -m shell -a "sleep 1s; shutdown -r now" -b -B 60 -P 0 # Shut down all the Pis. $ ansible all -i inventory -m shell -a "sleep 1s; shutdown -h now" -b -B 60 -P 0 Now you have an operational linux cluster that can be used for your wildest imagination, but your ideas are not flowing here is a few: home network add blocker, VPN server, host your own website, home automation setup, install alexa or all the above onto one cluster.

  • StackLinux, python, Ansible, Kubernetes
© 2025 Mekdutech. All Rights Reserved.