{"id":27155875,"url":"https://github.com/cloudsteak/k3s-raspberry-pi5","last_synced_at":"2026-01-20T08:01:28.308Z","repository":{"id":207567802,"uuid":"719562562","full_name":"cloudsteak/k3s-raspberry-pi5","owner":"cloudsteak","description":"Home Kubernetes on Raspberry Pi 5","archived":false,"fork":false,"pushed_at":"2025-02-06T22:36:30.000Z","size":413,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-04-08T19:57:07.083Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cloudsteak.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2023-11-16T12:40:14.000Z","updated_at":"2025-03-18T18:30:01.000Z","dependencies_parsed_at":"2023-11-16T13:48:21.047Z","dependency_job_id":"b5665834-312a-4b4b-bfb5-dc9f94c6a0a0","html_url":"https://github.com/cloudsteak/k3s-raspberry-pi5","commit_stats":null,"previous_names":["cloudsteak/k3s-raspberry-pi5"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cloudsteak/k3s-raspberry-pi5","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudsteak%2Fk3s-raspberry-pi5","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudsteak%2Fk3s-raspberry-pi5/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudsteak%2Fk3s-raspberry-pi5/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudsteak%2Fk3s-raspberry-pi5/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloudsteak","download_url":"https://codeload.github.com/cloudsteak/k3s-raspberry-pi5/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudsteak%2Fk3s-raspberry-pi5/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28598874,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T02:08:49.799Z","status":"ssl_error","status_checked_at":"2026-01-20T02:08:44.148Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2025-04-08T19:57:09.745Z","updated_at":"2026-01-20T08:01:28.264Z","avatar_url":"https://github.com/cloudsteak.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Home Kubernetes on Raspberry Pi 5\n\n## Background\n\n- In this configuration I use **only one** Raspberry Pi 5.\n- I use K3s with disabled traefik\n\n## Technical information:\n\n- Board: Raspberry Pi 5\n- Memory: 8 Gb\n- Storage: 64 GB (SANDISK EXTREME microSDXC 64 GB 170/80 MB/s UHS-I U3)\n- OS: Ubuntu 23.10 for Raspberry Pi 5 (https://ubuntu.com/download/raspberry-pi)\n\n## Table of content\n\n- [Basic installation and configuration](/#installation)\n- [Private image repository configuration](/#cr)\n- [Ingress NGINX installation and configuration](/#nginx)\n- [Example webapp installation with ingress](/#example1)\n\n## \u003ca name=\"installation\"\u003e\u003c/a\u003eBasic installation and configuration\n\n### Documentation\n\nStart here: https://k3s.io\n\n### Installation\n\n- Deploy K3s without traefik:\n\n```bash\n\nsudo -i\n# Disable traefik\nexport INSTALL_K3S_EXEC=\"server --disable=traefik --write-kubeconfig-mode=664\"\n\n# Create k3s cluster (for remote access use --tls-san {your server fqdn})\ncurl -sfL https://get.k3s.io | sh -s - server --tls-san {your server fqdn}\n```\n\n- Check installation:\n\n```bash\nsystemctl status k3s.service\n```\n\n- Exit root mode\n\n```bash\nexit\n```\n\n- Check installation:\n\n```bash\nsudo k3s kubectl get node\n```\n\n```bash\nk3s kubectl get node\n```\n\nConfig file: `sudo nano /etc/systemd/system/k3s.service`\n\n### Connect to cluster\n\n- Install kubectl\n\n```bash\nsnap install kubectl --classic\n```\n\n- Check connection:\n\n```bash\nkubectl get node\n```\n\n### Kubeconfig file\n\nLocation on the server: `/etc/rancher/k3s/k3s.yaml`\n\n- Copy the file to your userr's home directory:\n\n```bash\ncp /etc/rancher/k3s/k3s.yaml ~/.kube/config\n```\n\n- Copy the file to your local machine:\n\n```bash\nscp user@server:/etc/rancher/k3s/k3s.yaml ~/k3s.yaml\n```\n\n- Add it to your existing kubeconfig file:\n\n```bash\ncat k3s.yaml \u003e\u003e ~/.kube/config\n```\n\n- Modify ip address in the kubeconfig file:\n\n```bash\n# Linux\nsed -i 's/127.0.0.1/{your server ip}/g' ~/.kube/config\n\n# MacOS\nsed -i '' 's/127.0.0.1/{your server ip}/g' ~/.kube/config\n\n```\n\n- Modify server name from default to your server name:\n\n```bash\n# Linux\nsed -i 's/default/{your server name}/g' ~/.kube/config\n\n# MacOS\nsed -i '' 's/default/{your server name}/g' ~/.kube/config\n```\n\n### Uninstall K3s\n\n```bash\nsudo /usr/local/bin/k3s-uninstall.sh\n```\n\n## \u003ca name=\"cr\"\u003e\u003c/a\u003ePrivate image repository configuration\n\n### Azure Container Registry (ACR)\n\n#### Create ACR from\n\n- Install Azure-Cli\n\n```bash\nsudo curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash\n```\n\n- Check Azure-Cli\n\n```bash\naz -v\n```\n\n- Login to Azure\n\n```bash\naz login\n# Then follow the instructions\n```\n\n- Check the right subscription\n\n```bash\naz account list -o table\n```\n\n- Create ACR\n\n```bash\n# Random name for resource group\nresourceGroupName=$(cat /dev/urandom | tr -cd 'a-f0-9' | head -c 8)\n# Region\nresourceGroupRegion=\"swedencentral\"\n# Random name for acr\nacrName=$(cat /dev/urandom | tr -cd 'a-f0-9' | head -c 12)\n\naz group create --name $resourceGroupName --location $resourceGroupRegion\n\naz acr create --resource-group $resourceGroupName --name $acrName --sku Basic\n\naz acr update -n $acrName  --admin-enabled true\n```\n\n- Get connection information for ACR:\n  1. Open Azure Portal: http://portal.azure.com\n  2. Find the newly created ACR: https://portal.azure.com/#view/HubsExtension/BrowseResource/resourceType/Microsoft.ContainerRegistry%2Fregistries\n  3. open it and find the `Access Keys` menu item\n  4. Copy the following information:\n     - Login server\n     - Username\n     - password\n\n#### Connect to ACR from K3s\n\n- Edit K3s registries.yaml\n\n```bash\nsudo nano /etc/rancher/k3s/registries.yaml\n```\n\n- Add the ACR related configuration to end of it (https://docs.k3s.io/installation/private-registry#without-tls)\n\n```yaml\nmirrors:\n  \"{ Your ACR Login server value }\":\n    endpoint:\n      - \"https://{ Your ACR Login server value }\"\nconfigs:\n  \"{ Your ACR Login server value }\":\n    auth:\n      username: xxxxxxxxxx # this is the { ACR Username }\n      password: xxxxxxxxxx # this is the { ACR password }\n```\n\n- Restart K3s\n\n```bash\nsudo systemctl restart k3s\n```\n\n- Delete K3s\n\n```bash\nsudo /usr/local/bin/k3s-uninstall.sh\n```\n\n## \u003ca name=\"nginx\"\u003e\u003c/a\u003eIngress NGINX installation and configuration\n\nBecause NGINX is pretty common in this world, I use it for this scenario. Related document: https://kubernetes.github.io/ingress-nginx/deploy/\n\n\u003e Notes:\n\n\u003e _I don't use Helm here._\n\n\u003e _Check the available releases for controller: https://github.com/kubernetes/ingress-nginx/releases_\n\n- Install the controller\n\n```bash\nkubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.8.2/deploy/static/provider/cloud/deploy.yaml\n```\n\n- Check result\n\n```bash\nkubectl get svc -n ingress-nginx\n```\n\nNote: You need to see something similar (EXTERNAL-IP is the IP of your Raspberry Pi 5)\n\n```bash\nNAME                                 TYPE           CLUSTER-IP       EXTERNAL-IP      PORT(S)\ningress-nginx-controller             LoadBalancer   10.xxx.xxx.xxx   xxx.xxx.xxx.xxx   80:31449/TCP,443:32554/TCP\n```\n\n## \u003ca name=\"example1\"\u003e\u003c/a\u003eExample webapp installation with ingress\n\nFull documentation: [examples/webapp1](examples/webapp1/README.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudsteak%2Fk3s-raspberry-pi5","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudsteak%2Fk3s-raspberry-pi5","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudsteak%2Fk3s-raspberry-pi5/lists"}