{"id":20066561,"url":"https://github.com/bashtools/mok","last_synced_at":"2025-10-12T03:33:26.225Z","repository":{"id":57204043,"uuid":"258002205","full_name":"bashtools/mok","owner":"bashtools","description":"Run kubernetes on Mac or Linux in containers","archived":false,"fork":false,"pushed_at":"2025-05-17T20:03:26.000Z","size":3852,"stargazers_count":111,"open_issues_count":0,"forks_count":14,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-09-27T12:58:33.025Z","etag":null,"topics":["fedora","kind","kubernetes","linux","macos"],"latest_commit_sha":null,"homepage":"","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/bashtools.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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,"zenodo":null}},"created_at":"2020-04-22T19:39:11.000Z","updated_at":"2025-05-17T20:03:30.000Z","dependencies_parsed_at":"2024-10-20T01:09:55.978Z","dependency_job_id":"633ffb2a-0fe4-40ae-b392-945dc35ac21d","html_url":"https://github.com/bashtools/mok","commit_stats":null,"previous_names":["my-own-kind/mokctl","mclarkson/my-own-kind","bashtools/mok","bashtools/mokctl"],"tags_count":42,"template":false,"template_full_name":null,"purl":"pkg:github/bashtools/mok","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bashtools%2Fmok","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bashtools%2Fmok/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bashtools%2Fmok/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bashtools%2Fmok/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bashtools","download_url":"https://codeload.github.com/bashtools/mok/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bashtools%2Fmok/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279010149,"owners_count":26084692,"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","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["fedora","kind","kubernetes","linux","macos"],"created_at":"2024-11-13T13:58:52.321Z","updated_at":"2025-10-12T03:33:26.178Z","avatar_url":"https://github.com/bashtools.png","language":"Shell","readme":"# MOK - Run Kubernetes on your laptop\n\n![image](https://github.com/user-attachments/assets/0750910e-d6da-4c65-92ea-f7bc64b116cc)\n\n\nDefault kubernetes version: 1.33.1\n\nAvailable kubernetes versions:\n\n| Minor version | versions |\n| ------------- | -------- |\n| 1.31.x        | not supported |\n| 1.32.x        | 1.32.0, 1.32.1, 1.32.2, 1.32.3, 1.32.4 |\n| 1.33.x        | 1.33.0, 1.33.1 |\n\n## TL;DR Quick Start\n\nInstall:\n\n```bash\ncurl -O https://raw.githubusercontent.com/bashtools/mok/refs/heads/master/package/mok\nchmod +x mok\nsudo mv mok /usr/local/bin/\n```\n\nCreate cluster:\n\n```\nmok build image --get-prebuilt-image\nmok create cluster myk8s --masters 1 --publish\n```\n\nUse cluser:\n\n```\nexport KUBECONFIG=/var/tmp/admin-myk8s.conf\nkubectl get nodes\nkubectl get pods --all-namespaces\nkubectl run --privileged --rm -ti alpine --image alpine /bin/sh\n```\n\nDelete cluster:\n\n```\nmok delete cluster myk8s\n```\n\n## Requirements\n\n**MacOS**\n* Mok will will install any required packages using Homebrew, and will prompt you before doing so.\n* To see exactly how and what will be installed, see `src/macos.sh`.\n\n**Fedora Desktop or Server**\n* Install Podman.\n\n## Install\n\n### Installation for Linux and Mac\n\nUse `curl` to download `mok` and move it to `/usr/local/bin`:\n\n```bash\ncurl -O https://raw.githubusercontent.com/bashtools/mok/refs/heads/master/package/mok\nchmod +x mok\nsudo mv mok /usr/local/bin/\n```\n\n## Using Mok\n\n### Build a container image\n\n```bash\nmok build image --get-prebuilt-image\n```\n\n### Create a single node kuberenetes cluster\n\n```bash\nmok create cluster myk8s --masters 1 --publish\n```\n\nFor Mac users `--publish` must be used - but it's optional for Linux users:\n\n### Run some kubectl commands\n\nNaturally, the [kubectl command](https://kubernetes.io/docs/tasks/tools/) is needed for this.\n\n```bash\nexport KUBECONFIG=/var/tmp/admin-myk8s.conf\nkubectl get nodes\nkubectl get pods --all-namespaces\n```\n\n```bash\n# --privileged is required if you want to `ping` a host\nkubectl run --privileged --rm -ti alpine --image alpine /bin/sh\n```\n\n### Get help\n\n```bash\nmok -h\nmok create -h\nmok build -h\nmok machine -h\n# ... etc ...\n```\n\n### Delete the cluster\n\n```bash\nmok delete cluster myk8s\n```\n\nOn Mac OS do, `mok machine stop`, to stop the podman machine and free up resources.\n\n## To Uninstall mok completely\n\n### Mac\n\n```bash\nmok machine destroy\n```\n\nIf `mok` installed Homebrew, then remove homebrew and all its installed packages with:\n\n```\n/bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)\"\n```\n\nThen to completely remove any left over directories run:\n\n```\nsudo rm -rf /opt/homebrew\n```\n\nFinally, delete `mok`, with:\n\n```bash\nsudo rm /usr/local/bin/mok\n```\n\n### Linux\n\n```bash\nsudo rm /usr/local/bin/mok\n\n# If you used git and make, then delete the git repo\nrm -rf mok/\n```\n\nThen delete the podman images that were built by `mok build`.\n\n## Known Issues\n\n* With multiple master nodes only the first master is set up\n* Currently only single node clusters can be stopped and restarted\n* For Mac, if you installed Homebrew with `mok` then you should run\n  `/opt/homebrew/bin/brew doctor` and follow the instructions shown there if\n  you want to use Homebrew outside of Mok, or if you want to run the utilities\n  that mok installed (podman for example).\n\n## Some Features\n\n* Podman Desktop is not required\n* On Mac OS all the required packages are installed for you\n* On Mac OS it uses a non-default podman machine, so won't mess up your existing podman installation\n* Builds kubernetes master and worker nodes in containers\n* Very simple to use without need for YAML files\n* After creating the image a single node cluster builds in under 60 seconds\n* For multi-node clusters the 'create cluster' command returns only when kubernetes is completely ready, with all nodes and pods up and ready.\n* Can skip setting up kubernetes on the master and/or worker node (good for learning!)\n  * In this case the set-up scripts are placed in `/root` in the containers and can be run by hand\n  * Can do kubernetes the hard way (see [kthwic](https://github.com/my-own-kind/kubernetes-the-hard-way-in-containers))\n* `mok build` and `mok create` can show extensive kubernetes logs with `--tailf`\n\n* [Full Documentation](https://github.com/bashtools/mokctl-docs/tree/master/docs)\n\n## Support Mok\n\nFollow [Mok on BlueSky](https://bsky.app/profile/github-mok.bsky.social) or give Mok a star.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbashtools%2Fmok","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbashtools%2Fmok","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbashtools%2Fmok/lists"}