{"id":1620,"date":"2025-08-09T17:57:35","date_gmt":"2025-08-09T17:57:35","guid":{"rendered":"https:\/\/virtualall.sk\/?p=1620"},"modified":"2026-01-11T09:30:54","modified_gmt":"2026-01-11T09:30:54","slug":"k3s-na-raspberry-pi-od-napadu-po-funkcny-kubernetes-klaster","status":"publish","type":"post","link":"https:\/\/virtualall.sk\/en\/2025\/08\/k3s-na-raspberry-pi-od-napadu-po-funkcny-kubernetes-klaster\/","title":{"rendered":"K3s on Raspberry Pi &#8211; From Idea to Functional Kubernetes Cluster"},"content":{"rendered":"<p><strong>K3s on Raspberry Pi<\/strong> is a great way to create a home Kubernetes cluster. In this guide, I will show you the complete process from system preparation to a functional cluster.<\/p>\n<p><strong>K3s on Raspberry Pi<\/strong> is a lightweight Kubernetes distribution from Rancher Labs, ideal for resource-constrained environments like IoT and edge computing.<\/p>\n<h2>Requirements for K3s on Raspberry Pi<\/h2>\n<ul>\n<li><strong>Hardware:<\/strong> Raspberry Pi 4\/5 with 64-bit OS<\/li>\n<li><strong>RAM:<\/strong> Minimum 512MB (2GB+ recommended)<\/li>\n<li><strong>OS:<\/strong> Raspberry Pi OS Lite or Ubuntu Server 22.04 LTS (64-bit)<\/li>\n<li><strong>Storage:<\/strong> microSD card or SSD<\/li>\n<li><strong>Network:<\/strong> Static IP addresses<\/li>\n<\/ul>\n<p>More about K3s in the <a href=\"https:\/\/docs.k3s.io\/\" target=\"_blank\" rel=\"dofollow noopener\">official K3s documentation<\/a>.<\/p>\n<h2>System Preparation for K3s on Raspberry Pi<\/h2>\n<h3>System Update<\/h3>\n<pre><code>sudo apt update && sudo apt full-upgrade -y\nsudo reboot<\/code><\/pre>\n<h3>Disable Swap<\/h3>\n<pre><code>sudo dphys-swapfile swapoff\nsudo systemctl disable dphys-swapfile<\/code><\/pre>\n<h3>Enable Cgroups<\/h3>\n<p>Edit \/boot\/cmdline.txt and add:<\/p>\n<pre><code>cgroup_memory=1 cgroup_enable=memory<\/code><\/pre>\n<h2>Installing K3s on Raspberry Pi &#8211; Master Node<\/h2>\n<pre><code>curl -sfL https:\/\/get.k3s.io | sh -<\/code><\/pre>\n<h3>Verify Installation<\/h3>\n<pre><code>sudo systemctl status k3s\nk3s kubectl get nodes\nk3s kubectl get pods -A<\/code><\/pre>\n<h3>Get Token for Worker Nodes<\/h3>\n<pre><code>sudo cat \/var\/lib\/rancher\/k3s\/server\/node-token<\/code><\/pre>\n<h2>Adding Worker Nodes to K3s on Raspberry Pi Cluster<\/h2>\n<pre><code>curl -sfL https:\/\/get.k3s.io | K3S_URL=https:\/\/MASTER_IP:6443 K3S_TOKEN=NODE_TOKEN sh -<\/code><\/pre>\n<h2>Testing the Cluster<\/h2>\n<pre><code>k3s kubectl create deployment test-nginx --image=nginx\nk3s kubectl expose deployment test-nginx --type=NodePort --port=80\nk3s kubectl get service test-nginx<\/code><\/pre>\n<h2>Summary<\/h2>\n<p><strong>K3s on Raspberry Pi<\/strong> is an efficient solution for a home Kubernetes cluster. Key points:<\/p>\n<ul>\n<li>Lightweight distribution ideal for ARM devices<\/li>\n<li>Simple one-command installation<\/li>\n<li>Swap must be disabled<\/li>\n<li>Cgroups are required for resource management<\/li>\n<\/ul>\n<p>More guides on <a href=\"https:\/\/virtualall.sk\/category\/proxmox\/\">virtualization<\/a> in our section.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>V \u010dl\u00e1nku sa venujeme praktick\u00e9mu postupu, ako si vytvori\u0165 vlastn\u00fd Kubernetes klaster na Raspberry Pi pomocou od\u013eah\u010denej distrib\u00facie k3s. Tento n\u00e1vod je zameran\u00fd na IT nad\u0161encov aj profesion\u00e1lov, ktor\u00ed chc\u00fa spozna\u0165 Kubernetes v prostred\u00ed s n\u00edzkou spotrebou a minim\u00e1lnymi hardv\u00e9rov\u00fdmi n\u00e1rokmi, pri\u010dom si zachovaj\u00fa plnohodnotn\u00e9 funkcie pre orchestr\u00e1ciu kontajnerov.<\/p>\n","protected":false},"author":1,"featured_media":1645,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[53],"tags":[325,337],"class_list":["post-1620","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","tag-cloud-native","tag-container-orchestration"],"_links":{"self":[{"href":"https:\/\/virtualall.sk\/en\/wp-json\/wp\/v2\/posts\/1620","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/virtualall.sk\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/virtualall.sk\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/virtualall.sk\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/virtualall.sk\/en\/wp-json\/wp\/v2\/comments?post=1620"}],"version-history":[{"count":7,"href":"https:\/\/virtualall.sk\/en\/wp-json\/wp\/v2\/posts\/1620\/revisions"}],"predecessor-version":[{"id":1930,"href":"https:\/\/virtualall.sk\/en\/wp-json\/wp\/v2\/posts\/1620\/revisions\/1930"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/virtualall.sk\/en\/wp-json\/wp\/v2\/media\/1645"}],"wp:attachment":[{"href":"https:\/\/virtualall.sk\/en\/wp-json\/wp\/v2\/media?parent=1620"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/virtualall.sk\/en\/wp-json\/wp\/v2\/categories?post=1620"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/virtualall.sk\/en\/wp-json\/wp\/v2\/tags?post=1620"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}