{"id":18733922,"url":"https://github.com/mgoltzsche/kubemate","last_synced_at":"2025-04-12T18:32:01.641Z","repository":{"id":101283452,"uuid":"500229938","full_name":"mgoltzsche/kubemate","owner":"mgoltzsche","description":"Experimental k3s-based Kubernetes distribution for IoT (alpha)","archived":false,"fork":false,"pushed_at":"2024-12-25T20:01:31.000Z","size":2528,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-26T13:21:22.368Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mgoltzsche.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":"2022-06-05T22:50:45.000Z","updated_at":"2024-12-25T20:01:29.000Z","dependencies_parsed_at":"2023-12-10T22:31:30.912Z","dependency_job_id":"2ba3c229-a54f-4930-bd42-f3dc5f5e1fbc","html_url":"https://github.com/mgoltzsche/kubemate","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgoltzsche%2Fkubemate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgoltzsche%2Fkubemate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgoltzsche%2Fkubemate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgoltzsche%2Fkubemate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mgoltzsche","download_url":"https://codeload.github.com/mgoltzsche/kubemate/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248613589,"owners_count":21133545,"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":[],"created_at":"2024-11-07T15:11:48.283Z","updated_at":"2025-04-12T18:32:00.450Z","avatar_url":"https://github.com/mgoltzsche.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kubemate\n\nAn experimental k3s-based Kubernetes distribution to create local clusters on IoT devices.\n\n## Build from source\n\nThis section describes how to build and test kubemate from source.\n\n### Prerequisites\n\nThe following tools need to be installed on your host:\n\n* make\n* docker 20+\n\n### Build the container image\n\nTo build a container image for the linux/amd64 platform using docker, run:\n```sh\nmake container\n```\n\n### Test the container locally\n\nTo test kubemate on your local machine, you can run it within a container within the host network using `make run` and browse [`https://localhost:8080`](https://localhost:8443).  \n\nTo test the clustering locally, run a second kubemate container using `make run-other` within another terminal.\nTo get its IP address, run within another terminal:\n```sh\ndocker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' kubemate2\n```\n\nNow browse the 2nd container's web UI at `https://\u003cCONTAINER_IP\u003e:8443`.\nWithin the device list you should be able to see the first container and make the 2nd kubemate container join it as agent.  \n\n_Please note that within this local test setup only the 2nd container (that is within a docker network) can find the 1st container (that is within the host network) since discovery works using mDNS but docker propagates only mDNS broadcasts from the host into the container networks - not the other way around._\n\n#### Docker configuration on the host\n\nTo make kubemate work well with the docker installation on your host, you have to configure docker to use the `cgroupfs` driver, e.g. by configuring `/etc/docker/daemon.json` as follows:\n```json\n{\n\t\"exec-opts\": [\"native.cgroupdriver=cgroupfs\"]\n}\n```\n\n#### Networking\n\nTo make sure pod networking is working properly, use nf_tables instead of iptables legacy on your host.\n\n#### Upgrades\n\nTo apply a major version upgrade, uninstall/clear the entire state of the existing installation before launching the new version.\n\n#### Clear docker pods\n\nTo kill and remove all docker containers that originate from Kubernetes as well as their volumes, run [`kill-docker-pods.sh`](./kill-docker-pods.sh).\n\n#### Delete the state\n\nStop kubemate, delete all docker containers, delete the persistent state: [`kubemate-clear.sh`](./kubemate-clear.sh).\n\n### Prepare a Raspberry Pi OS image\n\nTo build a complete SD card image to run kubemate on a Raspberry Pi on top of the Raspberry Pi OS, run\n```sh\nmake raspios-image\n```\n\n#### Flash the image to an SD card\n\nYou can write a previously built image to an SD card as follows:\n\n```sh\nTARGET_DEVICE=/dev/sdX\nsudo umount ${TARGET_DEVICE}* || true\nsudo dd bs=4M if=./output-raspios/image of=\"$TARGET_DEVICE\"\nsync\n```\n\n**ATTENTION:** Please replace `/dev/sdX` carefully with the path to the device you want to write the image to - specifying the wrong device can cause data loss!\nTo find the correct device path, you can use `lsblk`.\n\n### Installing a Desktop environment\n\nIn case you need an Xfce desktop environment on your device, login to it via SSH and then install it as follows:\n```\nsudo apt install xfce4 x-window-system\nsudo systemctl set-default graphical.target\n```\n\nIn case you want to change your keyboard layout, run:\n```\nsudo dpkg-reconfigure keyboard-configuration\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgoltzsche%2Fkubemate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmgoltzsche%2Fkubemate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgoltzsche%2Fkubemate/lists"}