{"id":15090921,"url":"https://github.com/pmonllor/k3s-vagrant-virtualbox","last_synced_at":"2026-02-25T06:38:27.388Z","repository":{"id":251130805,"uuid":"835320589","full_name":"pmonllor/k3s-vagrant-virtualbox","owner":"pmonllor","description":"Local multi-node Kubernetes cluster deployed with Ansible, Vagrant \u0026 VirtualBox, works in both Windows \u0026 Linux ","archived":false,"fork":false,"pushed_at":"2024-07-29T16:43:12.000Z","size":7,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-26T02:21:39.550Z","etag":null,"topics":["ansible","k3s","kubernetes","vagrant","virtualbox"],"latest_commit_sha":null,"homepage":"","language":"Jinja","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/pmonllor.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":"2024-07-29T15:38:10.000Z","updated_at":"2024-12-24T19:33:45.000Z","dependencies_parsed_at":"2024-08-01T03:38:52.654Z","dependency_job_id":"e309b360-746f-4711-99c4-22c5d5cd789a","html_url":"https://github.com/pmonllor/k3s-vagrant-virtualbox","commit_stats":null,"previous_names":["pmonllor/k3s-vagrant-virtualbox"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmonllor%2Fk3s-vagrant-virtualbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmonllor%2Fk3s-vagrant-virtualbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmonllor%2Fk3s-vagrant-virtualbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmonllor%2Fk3s-vagrant-virtualbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pmonllor","download_url":"https://codeload.github.com/pmonllor/k3s-vagrant-virtualbox/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248530569,"owners_count":21119597,"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":["ansible","k3s","kubernetes","vagrant","virtualbox"],"created_at":"2024-09-25T10:34:41.354Z","updated_at":"2025-10-28T19:37:39.764Z","avatar_url":"https://github.com/pmonllor.png","language":"Jinja","funding_links":[],"categories":[],"sub_categories":[],"readme":"# k3s-vagrant-virtualbox\nThe purpose of this repo is to provide a simple way to launch a multi-node Kubernetes cluster for local development, both in Windows with WSL2 \u0026 natively on Linux\n\n# Index\n- [k3s-vagrant-virtualbox](#k3s-vagrant-virtualbox)\n- [Index](#index)\n- [Infrastructure configuration](#infrastructure-configuration)\n- [Windows considerations](#windows-considerations)\n- [Launch](#launch)\n  - [Windows](#windows)\n  - [Linux](#linux)\n- [Kubeconfig](#kubeconfig)\n- [Tech stack](#tech-stack)\n\n# Infrastructure configuration\n- Clone this repo\n\n- Edit ```vars/infra.yml``` as prefered\n\n```bash\n---\n# VMs hostnames (FQDN) - Example: pier.terrapin.ch\nmaster_server: master.juna\nworker_node_1: worker1.juna\nworker_node_2: worker2.juna\n\n# IP addreses\nmaster_server_ip: \"10.0.1.10\"\nworker_node_1_ip: \"10.0.1.20\"\nworker_node_2_ip: \"10.0.1.30\"\n\n# Disk sizes\nmaster_server_disk: \"100GB\"\nworker_node_1_disk: \"80GB\"\nworker_node_2_disk: \"80GB\"\n\n# Hardware - RAM specified in MB\nmaster_server_cpus: \"4\"\nmaster_server_ram: 8192\n\nworker_nodes_cpus: \"2\"\nworker_nodes_ram: 4096\n\n# OS - Ubuntu 24.04\nvagrant_box: \"bento/ubuntu-24.04\"\n\n# VirtualBox for Ubuntu 22.04 - https://www.virtualbox.org/wiki/Linux_Downloads\n# Will be installed on the host that launches the playbooks (localhost by default)\nvbox_ubuntu: \"https://download.virtualbox.org/virtualbox/7.0.20/virtualbox-7.0_7.0.20-163906~Ubuntu~noble_amd64.deb\"\n```\n\n# Windows considerations\n\n- Install on your windows machine: [Vagrant](https://developer.hashicorp.com/vagrant/downloads), [VirtualBox](https://www.virtualbox.org/wiki/Downloads) \u0026 [WSL2](https://docs.microsoft.com/en-us/windows/wsl/install)\n- Create Ubuntu distribution: `wsl --install -d ubuntu`\n- Convert distribution to use WSL2: `wsl --set-version ubuntu 2`\n- Enter the machine `wsl -d Ubuntu`\n- Install Ansible `python3 -m pip install ansible`\n\n# Launch\n\n## Windows\n**Inside WSL**\n```bash\nansible-playbook deploy_infra_windows.yml\n```\n**Outside WSL**\n```bash\nvagrant up\n```\n**Inside WSL - After vagrant up finishes**\n```bash\nansible-playbook setup_k3s.yml\n```\n## Linux\n```bash\nansible-playbook deploy_infra.yml\n```\n```bash\nansible-playbook setup_k3s.yml\n```\n\n# Kubeconfig\n\nYour kubeconfig file will be in ~/.kube/k3s.yaml to use it you can set the **KUBECONFIG** environment variable with this command\n\n```bash\nexport KUBECONFIG=\"~/.kube/k3s.yaml\"\n```\n\nVerify you have access to the cluster\n\n```bash\nkubectl get nodes\n```\n\nAnd you're all set\n\n# Tech stack\n\n\u003ctable\u003e\n    \u003ctr\u003e\n        \u003cth\u003eLogo\u003c/th\u003e\n        \u003cth\u003eName\u003c/th\u003e\n        \u003cth\u003eDescription\u003c/th\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003cimg width=\"32\" src=\"https://icon.icepanel.io/Technology/svg/K3s.svg\"\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003ca href=\"https://k3s.io\"\u003eK3s\u003c/a\u003e\u003c/td\u003e\n        \u003ctd\u003eLightweight Kubernetes\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003cimg width=\"32\" src=\"https://static-00.iconduck.com/assets.00/file-type-ansible-icon-2048x2042-jf1amk4h.png\"\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003ca href=\"https://www.ansible.com\"\u003eAnsible\u003c/a\u003e\u003c/td\u003e\n        \u003ctd\u003eAutomate VM provisioning and configuration\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003cimg width=\"32\" src=\"https://upload.wikimedia.org/wikipedia/commons/thumb/8/87/Vagrant.png/150px-Vagrant.png\"\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003ca href=\"https://www.vagrantup.com/\"\u003eVagrant\u003c/a\u003e\u003c/td\u003e\n        \u003ctd\u003eAutomate VM creation in Virtualbox\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003cimg width=\"32\" src=\"https://upload.wikimedia.org/wikipedia/commons/thumb/d/d5/Virtualbox_logo.png/121px-Virtualbox_logo.png\"\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003ca href=\"https://www.virtualbox.org/\"\u003eVirtualBox\u003c/a\u003e\u003c/td\u003e\n        \u003ctd\u003eVirtualization\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003cimg width=\"32\" src=\"https://upload.wikimedia.org/wikipedia/commons/thumb/3/35/Tux.svg/84px-Tux.svg.png\"\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003ca href=\"https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux\"\u003eWSL2\u003c/a\u003e\u003c/td\u003e\n        \u003ctd\u003eWindows Subsystem for Linux \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003cimg width=\"32\" src=\"https://upload.wikimedia.org/wikipedia/commons/thumb/a/ab/Logo-ubuntu_cof-orange-hex.svg/2048px-Logo-ubuntu_cof-orange-hex.svg.png\"\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003ca href=\"https://ubuntu.com/download/server\"\u003eUbuntu Server\u003c/a\u003e\u003c/td\u003e\n        \u003ctd\u003eBase OS for VMs\u003c/td\u003e\n    \u003c/tr\u003e\n\n\u003c/table\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpmonllor%2Fk3s-vagrant-virtualbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpmonllor%2Fk3s-vagrant-virtualbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpmonllor%2Fk3s-vagrant-virtualbox/lists"}