geerlingguy / pi-cluster

Raspberry Pi Cluster automation
MIT License
448 stars 45 forks source link

Turing PI v1 w/RPiVM3 from scratch #13

Open lewisdonofrio opened 4 months ago

lewisdonofrio commented 4 months ago

Would like to have a script that takes a scratch Ubuntu install that is on each node and allows you to go from ansible install to build and from a base inventory setup to having the k3s all up and running. what steps would I need to do?

Parnoud commented 4 months ago

I'm trying to do the same thing, new version of K3S are more memory consuming and master node keep crashing (out of memory)

Right now if you want to have un K3S cluster running with the latest version you need to do this :

Install lastest version of raspbian 64bit lite full update Clean swap and disable it add those at the end of /boot/cmdline.txt : cgroup_memory=1 cgroup_enable=memory and reboot configure static ipv4 address install k3s on master node :

curl -sfL https://get.k3s.io | K3S_TOKEN=changeme sh -s - --write-kubeconfig-mode 644 --disable traefik,metrics-server,local-storage --disable-network-policy

Then install k3s on agent node :

curl -sfL https://get.k3s.io | K3S_TOKEN=changeme K3S_URL=https://masterip:6443 sh -s -

You should have a cluster working the next step is to install helm and some dependency on master node.

i will try to produce some playbook after for re install my cluster but RPIm3* aren't strong enough now for k3s ...

lewisdonofrio commented 4 months ago

I succeeded with my last (2022) build using HypriotOS (Pirate OS) on the RPI nodes built from Ansible. I had the pods set with Prometheus, Graphana, and WordPress K3s after a month I would lose connection to Graphana because of memory issues (RPi3CMonly has 1 GB RAM.) I'll try the rebuild using Raspian would be nice to be able to use these playbooks that GeerlingGuy crafted up and maintains we should be able to use K3s hopefully they are not too memory hungry.

geerlingguy commented 4 months ago

I haven't tested on CM3 lately, because unfortunately I only have one CM3 node left. I've only been testing these clusters on Pi 4, CM4, Pi 5, and RK1 of late.

designermonkey commented 4 months ago

It's interesting to come across this, as I was going to ask @geerlingguy if you've had memory and CPU use issues on K3s. I have 4x Rpi4 8gb nodes that I can't run anything on of any merit as they almost overheat with CPU usage and eventually crash.

It's good to know it's not just me. (I know there are plenty of complaints to k3s about this.)

Does anyone have experience swapping out k3s for something like k0s?

github-actions[bot] commented 1 day ago

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.