{"id":16129638,"url":"https://github.com/0bu/rpi-k3s-cluster","last_synced_at":"2026-04-05T20:31:18.928Z","repository":{"id":181961150,"uuid":"364546232","full_name":"0Bu/rpi-k3s-cluster","owner":"0Bu","description":"k3s cluster for Raspberry Pi, installation and configuration","archived":false,"fork":false,"pushed_at":"2024-04-26T20:17:39.000Z","size":698,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-28T03:58:55.538Z","etag":null,"topics":["adguard","argocd","deconz","grafana","home-assistant","homebridge","influxdb","k3s","k8s","metallb","mosquitto","prometheus","raspberry-pi","sealed-secrets","telegraf"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/0Bu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-05-05T10:56:51.000Z","updated_at":"2024-04-29T13:46:54.294Z","dependencies_parsed_at":"2023-10-03T06:47:19.310Z","dependency_job_id":"307ae1e6-1624-414e-9ba3-0e6825947627","html_url":"https://github.com/0Bu/rpi-k3s-cluster","commit_stats":null,"previous_names":["0bu/pi-cluster","0bu/rpi-k3s-cluster"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0Bu%2Frpi-k3s-cluster","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0Bu%2Frpi-k3s-cluster/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0Bu%2Frpi-k3s-cluster/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0Bu%2Frpi-k3s-cluster/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0Bu","download_url":"https://codeload.github.com/0Bu/rpi-k3s-cluster/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247492466,"owners_count":20947541,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adguard","argocd","deconz","grafana","home-assistant","homebridge","influxdb","k3s","k8s","metallb","mosquitto","prometheus","raspberry-pi","sealed-secrets","telegraf"],"created_at":"2024-10-09T22:11:44.298Z","updated_at":"2026-04-05T20:31:18.922Z","avatar_url":"https://github.com/0Bu.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Installing [k3s](https://k3s.io) on [Raspberry Pi OS](https://www.raspberrypi.com/software/operating-systems/)\n\n### Enable cgroups\n- append `cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory` to `/boot/firmware/cmdline.txt`\n- *optional*: append `arm_64bit=1` to `/boot/config.txt` under `[all]` on 32-bit Raspberry Pi OS ([arm_64bit](https://www.raspberrypi.com/documentation/computers/config_txt.html#arm_64bit))\n\n## [NFS](https://www.digitalocean.com/community/tutorials/how-to-set-up-an-nfs-mount-on-ubuntu-20-04-de)\n#### Client\n```\nsudo apt update\nsudo apt install nfs-common\n```\n#### Server\n```\nsudo apt update\nsudo apt install nfs-kernel-server\nsudo mkdir /nfs\nsudo chown -R nobody:nogroup /nfs\n```\n#### NFS export config\n```\nsudo vim /etc/exports\n/nfs 192.168.1.0/24(rw,sync,no_subtree_check,no_root_squash)\n```\n```\nsudo systemctl restart nfs-kernel-server\n```\n\n#### NFS client mount\n```\nsudo mkdir /mnt/nfs\nsudo mount \u003cHOST_IP\u003e:/nfs /mnt/nfs\n```\n\n## Dual stack installation\nk3s docs: \u003chttps://docs.k3s.io/networking/basic-network-options#dual-stack-ipv4--ipv6-networking\u003e\n\n#### *Optional*: Router Advertisement Daemon\n```\nsudo apt install radvd\n```\n\n#### [radvd configuration](https://linux.die.net/man/5/radvd.conf)\n`sudo vim /etc/radvd.conf`\n```\ninterface eth0 {\n   AdvSendAdvert on;\n   prefix fd7c:3b4a:5f1d::/64 {};\n};\n```\n\n### Add static IPv6 ULA\ncheck the link `ip link` and create\n`sudo vim /etc/systemd/network/10-eth0-static-ipv6.network`\n```\n[Match]\nName=eth0\n\n[Network]\nIPv6AcceptRA=yes\nAddress=fd7c:3b4a:5f1d::5a/64\n```\n\n### Enable systemd-network\n```\nsudo systemctl enable systemd-networkd\nsudo systemctl restart systemd-networkd\n```\n\n## Master installation\n```\nsudo mkdir -p /etc/rancher/k3s\nsudo vim /etc/rancher/k3s/config.yaml\n```\n\n```\nwrite-kubeconfig-mode: \"644\"\ndisable:\n  - servicelb\nnode-ip: \"192.168.1.5,fd7c:3b4a:5f1d::5a\"\ncluster-cidr: \"10.42.0.0/16,fd00:10:42::/56\"\nservice-cidr: \"10.43.0.0/16,fd00:10:43::/112\"\nflannel-ipv6-masq: true\n```\n\n```\ncurl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=\"v1.35.0+k3s3\" sh -\n```\n\n### Node installation\nGet master token\n`sudo cat /var/lib/rancher/k3s/server/node-token`\n\n```\nsudo mkdir -p /etc/rancher/k3s\nsudo vim /etc/rancher/k3s/config.yaml\n```\n\n```\nserver: \"https://192.168.1.5:6443\"\ntoken: \"TOKEN\"\nwrite-kubeconfig-mode: \"644\"\nnode-ip: \"192.168.1.5,fd7c:3b4a:5f1d::5a\"\n```\n\n```\ncurl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=\"v1.35.0+k3s3\" sh -\n```\n\n## High availability cluster installation\nk3s docs: \u003chttps://docs.k3s.io/datastore/ha-embedded\u003e\n```\nsudo mkdir -p /etc/rancher/k3s\nsudo vim /etc/rancher/k3s/config.yaml\n```\n\n```\ncluster-init: true\ntoken: \"TOKEN\"\nwrite-kubeconfig-mode: \"644\"\ndisable:\n  - servicelb\nnode-ip: \"192.168.1.5,fd7c:3b4a:5f1d::5a\"\ncluster-cidr: \"10.42.0.0/16,fd00:10:42::/56\"\nservice-cidr: \"10.43.0.0/16,fd00:10:43::/112\"\nflannel-ipv6-masq: true\n```\n\n```\ncurl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=\"v1.35.0+k3s3\" sh -\n```\n\n### High availability node installation\n```\nsudo mkdir -p /etc/rancher/k3s\nsudo vim /etc/rancher/k3s/config.yaml\n```\n\n```\nserver: https://192.168.1.5:6443\ntoken: \"TOKEN\"\nwrite-kubeconfig-mode: \"644\"\ndisable:\n  - servicelb\nnode-ip: \"192.168.1.15,fd7c:3b4a:5f1d::5b\"\ncluster-cidr: \"10.42.0.0/16,fd00:10:42::/56\"\nservice-cidr: \"10.43.0.0/16,fd00:10:43::/112\"\nflannel-ipv6-masq: true\n```\n\n```\ncurl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=\"v1.35.0+k3s3\" sh -\n```\n\n## Single stack installation\nk3s docs: \u003chttps://docs.k3s.io/installation\u003e\n```\nexport K3S_KUBECONFIG_MODE=\"644\"\nexport INSTALL_K3S_VERSION=\"v1.35.0+k3s3\"\nexport INSTALL_K3S_EXEC=\"--disable servicelb\"\ncurl -sfL https://get.k3s.io | sh -\n```\n\n### Node installation\nOn master \n```\nsudo cat /var/lib/rancher/k3s/server/node-token\n```\n\n```\nexport K3S_KUBECONFIG_MODE=\"644\"\nexport INSTALL_K3S_VERSION=\"v1.35.0+k3s3\"\nexport K3S_URL=\"https://192.168.1.5:6443\"\nexport K3S_TOKEN=\"TOKEN\"\ncurl -sfL https://get.k3s.io | sh -\n```\n\n### [Helm](https://helm.sh) installation\n```\ncurl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash\n```\n\n#### Helm configuration\n```\nexport KUBECONFIG=/etc/rancher/k3s/k3s.yaml\n```\nor\n```\nmkdir -p ~/.kube\nkubectl config view --raw \u003e ~/.kube/config\nsudo chmod go-r ~/.kube/config\n```\n\n### [k9s](https://github.com/derailed/k9s) installation\n```\ncurl -sLO \"https://github.com/derailed/k9s/releases/download/v0.50.18/k9s_linux_arm.deb\"\nsudo dpkg -i k9s_linux_arm.deb\nrm k9s_linux_arm.deb\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0bu%2Frpi-k3s-cluster","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0bu%2Frpi-k3s-cluster","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0bu%2Frpi-k3s-cluster/lists"}