{"id":13647868,"url":"https://github.com/linuxkit/kubernetes","last_synced_at":"2025-04-05T21:07:53.006Z","repository":{"id":49793413,"uuid":"111085762","full_name":"linuxkit/kubernetes","owner":"linuxkit","description":"minimal and immutable Kubernetes images built with LinuxKit","archived":false,"fork":false,"pushed_at":"2019-08-01T09:23:31.000Z","size":423,"stargazers_count":402,"open_issues_count":12,"forks_count":75,"subscribers_count":31,"default_branch":"master","last_synced_at":"2025-03-29T20:05:29.147Z","etag":null,"topics":["kubernetes","kubernetes-deployment","linuxkit"],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/linuxkit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-17T09:38:39.000Z","updated_at":"2025-03-01T11:38:45.000Z","dependencies_parsed_at":"2022-08-24T19:40:36.293Z","dependency_job_id":null,"html_url":"https://github.com/linuxkit/kubernetes","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linuxkit%2Fkubernetes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linuxkit%2Fkubernetes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linuxkit%2Fkubernetes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linuxkit%2Fkubernetes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/linuxkit","download_url":"https://codeload.github.com/linuxkit/kubernetes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247399877,"owners_count":20932876,"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":["kubernetes","kubernetes-deployment","linuxkit"],"created_at":"2024-08-02T01:03:48.630Z","updated_at":"2025-04-05T21:07:52.985Z","avatar_url":"https://github.com/linuxkit.png","language":"Shell","funding_links":[],"categories":["Operating System","Shell","kubernetes"],"sub_categories":["[Jenkins](#jenkins)"],"readme":"# Kubernetes and LinuxKit\n\n[![CircleCI](https://circleci.com/gh/linuxkit/kubernetes.svg?style=svg)](https://circleci.com/gh/linuxkit/kubernetes)\n\nThis project aims to demonstrate how one can create minimal and immutable Kubernetes OS images with LinuxKit.\n\n## Build requirements\n\nTo build images and to rebuild the individual packages you will need the [LinuxKit tool](https://github.com/linuxkit/linuxkit/tree/master/src/cmd/linuxkit)\n\nIf you already have `go` installed you can use `go get -u github.com/linuxkit/linuxkit/src/cmd/linuxkit` to install the tool.\n\nOn MacOS there is a `brew tap` available. Detailed instructions are at [linuxkit/homebrew-linuxkit](https://github.com/linuxkit/homebrew-linuxkit), the short summary is\n```\nbrew tap linuxkit/linuxkit\nbrew install --HEAD linuxkit\n```\n\nBuild requirements from source:\n- GNU `make`\n- Docker\n- optionally `qemu`\n\n## Building OS images\n\nTo build the default OS images:\n```\nmake all\n```\n\nBy default this will build images using Docker Engine for execution. To instead use cri-containerd use:\n```\nmake all KUBE_RUNTIME=cri-containerd\n```\n\n## Booting and initialising OS images\n\nBoot Kubernetes master OS image using `hyperkit` on macOS: or `qemu` on Linux:\n```\n./boot.sh\n```\nor, to automatically initialise the cluster upon boot with no additional options\n```\nKUBE_MASTER_AUTOINIT=\"\" ./boot.sh\n```\n\nGet IP address of the master:\n```\nip addr show dev eth0\n```\n\nLogin to the kubelet container:\n```\n./ssh_into_kubelet.sh \u003cmaster-ip\u003e\n```\n\nManually initialise master with `kubeadm` if booted without `KUBE_MASTER_AUTOINIT`:\n```\nkubeadm-init.sh\n```\n\nOnce `kubeadm` exits, make sure to copy the `kubeadm join` arguments,\nand try `kubectl get nodes` from within the master.\n\nIf you just want to run a single node cluster with jobs running on the master, you can use:\n```\nkubectl taint nodes --all node-role.kubernetes.io/master- --kubeconfig /etc/kubernetes/admin.conf\n```\n\nTo boot a node use:\n```\n./boot.sh \u003cn\u003e [\u003cjoin_args\u003e ...]\n```\n\nMore specifically, to start 3 nodes use 3 separate shells and run this:\n```\nshell1\u003e ./boot.sh 1 --token bb38c6.117e66eabbbce07d 192.168.65.22:6443 --discovery-token-unsafe-skip-ca-verification\nshell2\u003e ./boot.sh 2 --token bb38c6.117e66eabbbce07d 192.168.65.22:6443 --discovery-token-unsafe-skip-ca-verification\nshell3\u003e ./boot.sh 3 --token bb38c6.117e66eabbbce07d 192.168.65.22:6443 --discovery-token-unsafe-skip-ca-verification\n```\n\n## Platform specific information\n\n### MacOS\n\nThe above instructions should work as is.\n\n### Linux\n\nBy default `linuxkit run` uses user mode networking which does not\nsupport access from the host. To workaround this you can use port\nforwarding e.g.\n\n    KUBE_RUN_ARGS=\"-publish 2222:22\" ./boot.sh\n\n    ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p 2222 root@localhost\n\nHowever you will not be able to run worker nodes since individual\ninstances cannot see each other.\n\nTo enable networking between instance unfortunately requires `root`\nprivileges to configure a bridge and setup the bridge mode privileged\nhelper.\n\nSee http://wiki.qemu.org/Features/HelperNetworking for details in\nbrief you will need:\n\n- To setup and configure a bridge (including e.g. DHCP etc) on the\n  host. (You can reuse a bridge created by e.g. `virt-mananger`)\n- To set the `qemu-bridge-helper` setuid root. The location differs by\n  distro, it could be `/usr/lib/qemu/qemu-bridge-helper` or\n  `/usr/local/libexec/qemu-bridge-helper` or elsewhere. You need to\n  `chmod u+s «PATH»`.\n- List the bridge created in the first step in `/etc/qemu/bridge.conf`\n  with a line like `allow br0` (if your bridge is called `br0`).\n- Set `KUBE_NETWORKING=bridge,«name»` e.g.\n\n    KUBE_NETWORKING=\"bridge,br0\" ./boot.sh\n    KUBE_NETWORKING=\"bridge,br0\" ./boot.sh 1 «options»\n\n## Configuration\n\nThe `boot.sh` script has various configuration variables at the top\nwhich can be overridden via the environment e.g.\n\n    KUBE_VCPUS=4 ./boot.sh\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinuxkit%2Fkubernetes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinuxkit%2Fkubernetes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinuxkit%2Fkubernetes/lists"}