{"id":13753505,"url":"https://github.com/chris-short/rak8s","last_synced_at":"2025-10-05T14:31:16.823Z","repository":{"id":43327599,"uuid":"117596690","full_name":"chris-short/rak8s","owner":"chris-short","description":"Stand up a Raspberry Pi based Kubernetes cluster with Ansible","archived":true,"fork":false,"pushed_at":"2020-06-28T19:41:04.000Z","size":83,"stargazers_count":367,"open_issues_count":10,"forks_count":115,"subscribers_count":17,"default_branch":"master","last_synced_at":"2024-05-02T04:57:45.261Z","etag":null,"topics":["ansible","ansible-playbooks","ansible-roles","kubeadm","kubectl","kubernetes","kubernetes-cluster","kubernetes-setup","raspberry-pi","raspberry-pi-3"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/chris-short.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"docs/code_of_conduct.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-15T21:21:42.000Z","updated_at":"2024-04-12T22:41:20.000Z","dependencies_parsed_at":"2022-09-12T15:30:34.124Z","dependency_job_id":null,"html_url":"https://github.com/chris-short/rak8s","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chris-short%2Frak8s","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chris-short%2Frak8s/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chris-short%2Frak8s/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chris-short%2Frak8s/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chris-short","download_url":"https://codeload.github.com/chris-short/rak8s/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235405233,"owners_count":18984868,"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":["ansible","ansible-playbooks","ansible-roles","kubeadm","kubectl","kubernetes","kubernetes-cluster","kubernetes-setup","raspberry-pi","raspberry-pi-3"],"created_at":"2024-08-03T09:01:23.526Z","updated_at":"2025-10-05T14:31:11.500Z","avatar_url":"https://github.com/chris-short.png","language":"Shell","funding_links":[],"categories":["raspberry-pi","Shell"],"sub_categories":[],"readme":"# rak8s\n\n(pronounced rackets - /ˈrækɪts/)\n\nStand up a Raspberry Pi based Kubernetes cluster with Ansible\n\n[**rak8s**](https://github.com/rak8s) is maintained by [Chris Short](https://github.com/chris-short) and a community of open source folks willing to help.\n\n## Why?\n\n* Raspberry Pis are rad\n* Ansible is awesome\n* Kubernetes is keen\n\nARM is going to be the datacenter and home computing platform of the future. It makes a lot of sense to start getting used to working in its unique environment.\n\nAlso, it's cheaper than a year of GKE. Plus, why not run Kubernetes in your home?\n\n## Prerequisites\n\n### Hardware\n\n* Raspberry Pi 3 (3 or more)\n* Class 10 SD Cards\n* Network connection (wireless or wired) with access to the internet\n\n### Software\n\n* [Raspbian Lite](https://www.raspberrypi.org/downloads/raspbian/) (installed on each Raspberry Pi)\n\n* Raspberry Pis should have static IPs\n    * Requirement for Kubernetes and Ansible inventory\n    * You can set these via OS configuration or DHCP reservations (your choice)\n\n* Ability to SSH into all Raspberry Pis and escalate privileges with sudo\n    * The pi user is fine\n    * Please change the pi user's password\n\n* [Ansible](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html) 2.7.1 or higher\n\n* [`kubectl`](https://kubernetes.io/docs/tasks/tools/install-kubectl/) should be available on the system you intend to use to interact with the Kubernetes cluster.\n    * If you are going to login to one of the Raspberry Pis to interact with the cluster `kubectl` is installed and configured by default on the master Kubernetes master.\n    * If you are administering the cluster from a remote machine (your laptop, desktop, server, bastion host, etc.) `kubectl` will not be installed on the remote machine but it will be configured to interact with the newly built cluster once `kubectl` is installed.\n\n### Recommendations\n\n* Setup SSH key pairs so your password is not required every time Ansible runs\n\n## Stand Up Your Kubernetes Cluster\n\n### Download the latest release or clone the repo:\n\n``` bash\ngit clone https://github.com/rak8s/rak8s.git\n```\n\n### Modify ansible.cfg and inventory\n\nModify the `inventory` file to suit your environment. Change the names to your liking and the IPs to the addresses of your Raspberry Pis.\n\nIf your SSH user on the Raspberry Pis are not the Raspbian default `pi` user modify `remote_user` in the `ansible.cfg`.\n\n### Confirm Ansible is working with your Raspberry Pis:\n\n``` bash\nansible -m ping all\n```\n\nThis may fail to ping if you have not setup SSH keys and only configured your Pi's with passwords\n\n## Deploy, Deploy, Deploy\n\n``` bash\nansible-playbook cluster.yml\n```\n\n## Interact with Kubernetes\n\n### CLI\n\nTest your Kubernetes cluster is up and running:\n\n``` bash\nkubectl get nodes\n```\n\nThe output should look something like this:\n\n``` bash\nNAME       STATUS    ROLES     AGE       VERSION\npik8s000   Ready     master    2d        v1.9.1\npik8s001   Ready     \u003cnone\u003e    2d        v1.9.1\npik8s002   Ready     \u003cnone\u003e    2d        v1.9.1\npik8s003   Ready     \u003cnone\u003e    2d        v1.9.1\npik8s005   Ready     \u003cnone\u003e    2d        v1.9.1\npik8s004   Ready     \u003cnone\u003e    2d        v1.9.1\n```\n\n## Dashboard\n\nrak8s installs the non-HTTPS version of the Kubernetes dashboard. This is not recommended for production clusters but, it simplifies the setup. Access the dashboard by running:\n\n``` bash\nkubectl proxy\n```\n\nThen open a web browser and navigate to:\n[http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/](http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/)\n\n## Need to Start Over?\n\nDid something go wrong? Nodes fail some process or not joined to the cluster? Break Docker Versions with apt-update?\n\nTry the process again from the beginning:\n\n``` bash\nansible-playbook cleanup.yml\n```\n\nWait for everything to run and then start again with:\n\n```bash\nansible-playbook cluster.yml\n```\n\n## Where to Get Help\n\nIf you run into any problems please join our welcoming [Discourse](https://discourse.rak8s.io/) community. If you find a bug please open an issue and pull requests are always welcome.\n\n## Etymology\n\n[**rak8s**](https://rak8s.io) (pronounced rackets - /ˈrækɪts/)\n\nCoined by [Kendrick Coleman](https://github.com/kacole2) on [13 Jan 2018](https://twitter.com/KendrickColeman/status/952242602690129921)\n\n## References \u0026 Credits\n\nThese playbooks were assembled using a handful of very helpful guides:\n\n* [K8s on (vanilla) Raspbian Lite](https://gist.github.com/alexellis/fdbc90de7691a1b9edb545c17da2d975) by [Alex Ellis](https://www.alexellis.io/)\n* [Installing kubeadm](https://kubernetes.io/docs/setup/independent/install-kubeadm/)\n* [kubernetes/dashboard - Access control - Admin privileges](https://github.com/kubernetes/dashboard/wiki/Access-control#admin-privileges)\n* [Install using the convenience script](https://docs.docker.com/engine/installation/linux/docker-ce/debian/#install-using-the-convenience-script)\n\nA very special thanks to [**Alex Ellis**](https://www.alexellis.io/) and the [OpenFaaS](https://www.openfaas.com/) community for their assitance in answering questions and making sense of some errors.\n\n## Media Coverage\n\n* [Raspberry Pi Kubernetes Cluster - chrisshort.net](https://chrisshort.net/raspberry-pi-kubernetes-cluster/)\n* [DevOps'ish 060: WTF Google, SRE in a Serverless World, DevOps Requires Rethinking Norms, Kubernetes...](https://devopsish.com/060/)\n* [071: Susan Fowler, Open Offices, Tech Debt, Cloud Native Serverless, Kubernetes, and More](https://devopsish.com/071/)\n* [073: DevOps Hiring Guide, RIP RTFM, BGP \u0026 DNS, Kubernetes, GitLab, and More](https://devopsish.com/073/)\n* [Building A Kubernetes Raspberry Pi3 Cluster With Rak8s And Ansible](http://nullendpoint.com/coding/2019/03/21/building-a-kubernetes-raspberry-pi3-cluster-with-rak8s-and-ansible/)\n* [WOA Issue 37 - Armv8 Collaboration](https://www.worksonarm.com/blog/woa-issue-37/)\n* [7 Raspberry Pi projects to explore](https://opensource.com/article/19/3/raspberry-pi-projects)\n* [Running a Raspberry Pi cluster, a few months after - Alexandre Chaintreuil](http://achntrl.com/2018/11/05/running-a-kubernetes-cluster/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchris-short%2Frak8s","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchris-short%2Frak8s","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchris-short%2Frak8s/lists"}