{"id":18638318,"url":"https://github.com/dehasi/k8s-vagrant","last_synced_at":"2025-11-04T15:30:37.974Z","repository":{"id":98305945,"uuid":"564508245","full_name":"dehasi/k8s-vagrant","owner":"dehasi","description":null,"archived":false,"fork":false,"pushed_at":"2022-12-18T22:36:27.000Z","size":68,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-27T09:25:26.335Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dehasi.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":null,"license":null,"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-11-10T21:42:33.000Z","updated_at":"2023-03-05T06:47:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"7cacc97a-ce52-4a67-ab74-646c474d4bce","html_url":"https://github.com/dehasi/k8s-vagrant","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/dehasi%2Fk8s-vagrant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dehasi%2Fk8s-vagrant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dehasi%2Fk8s-vagrant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dehasi%2Fk8s-vagrant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dehasi","download_url":"https://codeload.github.com/dehasi/k8s-vagrant/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239435584,"owners_count":19638162,"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-07T05:40:31.682Z","updated_at":"2025-02-18T08:26:35.953Z","avatar_url":"https://github.com/dehasi.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"= Kubernetes Cluster with Containerd on Vagrant\n\nMaking 3 nodes cluster.\n\n== Prepare vagrant\n=== Network\nTo be able to set IPs like `10.x.x.x` create a file `/etc/vbox/networks.conf`\nwith content:\n\n./etc/vbox/networks.conf\n----\ninclude::networks.conf[]\n----\n=== Box\n\nChoose the suitable box. I ended with `bento/ubuntu-16.04`.\nAlso tried\n\n* `hashicorp/precise64` - doesn't have overlay module;\n* `ubuntu/jammy64` - leads to `CrashLoopBackoff`.\n\n[source, ruby]\n----\n  config.vm.box = \"bento/ubuntu-16.04\"\n----\n\n== Install kubeadm\n\nAll scripts that config boxes, and install `containerd` and `kubeadm` are in `/scipts` folder.\n\n== Control Pane\n\n`kubeadm` needs at least 1.7 Gb RAM. That's why `provider` was configured.\n[source, ruby]\n----\nconfig.vm.provider \"virtualbox\" do |vb|\n  vb.memory = 3*GB\n  vb.cpus = 2\nend\n----\n\nWhile initiating `kubeadm` master's IP should be used (`--apiserver-advertise-address`)\notherwise some default network created by Vagrant will be used.\n\n.init control pane\n[source, shell]\n----\ninclude::init-kubernetes-control-pane.sh[]\n----\n\n`--pod-network-cidr` should have IPs which CNI plugin has.\n\nFor `calico` default is 192.168.0.0/16 for `flannel` it is 10.244.0.0/16,\nnot sure what needs to be done to vagrant for ips not clash,\nhttps://gist.github.com/walidshaari/02dfa17fffc9ac93cd47545d427ed76a[source].\n\n== Manual steps\nWe need to init Container Network Interface (CNI) plugin and join workers.\n\n.manual steps\n[source, shell]\n----\ninclude::after-init-manual-steps.sh[]\n----\n\n.result\n----\nvagrant@control-pane:~$ kubectl get nodes\nNAME           STATUS   ROLES           AGE     VERSION\ncontrol-pane   Ready    control-plane   9m12s   v1.24.0\nworker-1       Ready    worker          3m48s   v1.24.0\nworker-2       Ready    worker          3m18s   v1.24.0\n----\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdehasi%2Fk8s-vagrant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdehasi%2Fk8s-vagrant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdehasi%2Fk8s-vagrant/lists"}