{"id":16900034,"url":"https://github.com/runlevel5/kubernetes-cluster-libvirt-vagrant","last_synced_at":"2025-04-12T09:19:57.228Z","repository":{"id":142032826,"uuid":"251308735","full_name":"runlevel5/kubernetes-cluster-libvirt-vagrant","owner":"runlevel5","description":"A simple way to bring up a K8S with libvirt/vagrant for learning purpose","archived":false,"fork":false,"pushed_at":"2020-08-29T02:54:42.000Z","size":1981,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-12T09:19:48.743Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/runlevel5.png","metadata":{"files":{"readme":"README.md","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":"2020-03-30T13:11:56.000Z","updated_at":"2024-01-04T15:12:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"715f8737-57eb-4d6a-997a-8c94209ebd97","html_url":"https://github.com/runlevel5/kubernetes-cluster-libvirt-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/runlevel5%2Fkubernetes-cluster-libvirt-vagrant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runlevel5%2Fkubernetes-cluster-libvirt-vagrant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runlevel5%2Fkubernetes-cluster-libvirt-vagrant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runlevel5%2Fkubernetes-cluster-libvirt-vagrant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/runlevel5","download_url":"https://codeload.github.com/runlevel5/kubernetes-cluster-libvirt-vagrant/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248543841,"owners_count":21121838,"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-10-13T17:51:21.887Z","updated_at":"2025-04-12T09:19:57.204Z","avatar_url":"https://github.com/runlevel5.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Kubernetes Cluster with libvirt/kvm\n\nHave you just picked up k8s? Well firstly you should look into `minikube` if you\nare after a simple one-node cluster for learning.\n\nIf you fail to get minikube to work on your machine, you could set up a local\ncluster with libvirt. DO NOT USE it for production.\n\nThis cluster consists of 1 master and 2 worker nodes that are configured with:\n\n* CRI: containerd\n* CNI: calico\n* SMI: none\n\n### Prerequisites\n\n* Linux (amd64|ppc64le|arm64)\n* qemu\n* vagrant\n* vagrant-libvirt\n\n### Get started\n\n1. Orchestrate cluster:\n\n```\ncd [alpine|ubuntu] \u0026\u0026 vagrant up\n```\n\n4. Verify that you could ssh into either master or worker:\n\n```\nvagrant ssh kmaster\nvagrant ssh kworker1\nvagrant ssh kworker2\n```\n\n5. Check the health of the cluster:\n\n```\nvagrant ssh kmaster\nkubectl cluster-info\nkubectl get cs # should show everything healthy\n```\n\n6. Setting up connection to cluster from your host:\n\n```\nvagrant ssh-config \u003e\u003e ~/.ssh/config\nscp kmaster:/home/ubuntu/.kube/config ~/.kube/\nconfig\nkubectl cluster-info\n```\n\n### Issues\n\nIf Vagrant gets stuck at \"waiting to get IP address\" part, it is likely that libvirt VM fail to assign IP address.\nThe workaround is to Ctrl-C to cancel the operation, then `vagrant destroy \u0026\u0026 vagrant up` again. \n\n### Credits\n\nCodes are based on:\n\n* https://github.com/osuosl/packer-templates\n* https://github.com/justmeandopensource/kubernetes\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frunlevel5%2Fkubernetes-cluster-libvirt-vagrant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frunlevel5%2Fkubernetes-cluster-libvirt-vagrant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frunlevel5%2Fkubernetes-cluster-libvirt-vagrant/lists"}