{"id":19406795,"url":"https://github.com/blankdots/rke2-terraform-libvirt","last_synced_at":"2026-05-29T16:31:24.432Z","repository":{"id":136671432,"uuid":"595568113","full_name":"blankdots/rke2-terraform-libvirt","owner":"blankdots","description":"RKE2 Terraform libvirt installer","archived":false,"fork":false,"pushed_at":"2026-03-26T09:38:17.000Z","size":117,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-27T03:35:12.281Z","etag":null,"topics":["libvirt-provider","rke2","terraform"],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blankdots.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-01-31T10:59:08.000Z","updated_at":"2026-03-26T09:38:21.000Z","dependencies_parsed_at":"2024-01-22T15:06:20.248Z","dependency_job_id":"6ca07487-18af-47ae-b753-e976210e12f6","html_url":"https://github.com/blankdots/rke2-terraform-libvirt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/blankdots/rke2-terraform-libvirt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blankdots%2Frke2-terraform-libvirt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blankdots%2Frke2-terraform-libvirt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blankdots%2Frke2-terraform-libvirt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blankdots%2Frke2-terraform-libvirt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blankdots","download_url":"https://codeload.github.com/blankdots/rke2-terraform-libvirt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blankdots%2Frke2-terraform-libvirt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33662205,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"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":["libvirt-provider","rke2","terraform"],"created_at":"2024-11-10T11:44:34.719Z","updated_at":"2026-05-29T16:31:24.415Z","avatar_url":"https://github.com/blankdots.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rke2-terraform-libvirt\n\n[![Lint](https://github.com/blankdots/rke2-terraform-libvirt/actions/workflows/tflint.yml/badge.svg)](https://github.com/blankdots/rke2-terraform-libvirt/actions/workflows/tflint.yml)\n[![Scripts linter](https://github.com/blankdots/rke2-terraform-libvirt/actions/workflows/shellcheck.yml/badge.svg)](https://github.com/blankdots/rke2-terraform-libvirt/actions/workflows/shellcheck.yml)\n[![tfsec](https://github.com/blankdots/rke2-terraform-libvirt/actions/workflows/tfsec.yml/badge.svg)](https://github.com/blankdots/rke2-terraform-libvirt/actions/workflows/tfsec.yml)\n\nA repository that creates a RKE2 kubernetes cluster using Terraform.\n\nOut of the box it comes configured with:\n\n- pre-checks all the requirements are met for the setup to run;\n- checks kubernetes API is running and nodes are available after apply;\n- generating ssh key for `kubernetes` user, to be used to connect to the VMs (instead of password login);\n    - makes use of ssh-agent to load key;\n    - key is password protected and generated once;\n- generating tf.vars file based on template in file `terraform-template.json`;\n- exports kubernetes config file to `k8s.yaml` in root folder;\n- kubernetes rke2 additions:\n    - system-upgrade controller, to be able to run plans from https://docs.rke2.io/upgrade/automated_upgrade/#configure-plans ;\n    - custom audit policy to have more precise logging;\n    - wireguard added and configured;\n    - `automountServiceAccountToken` set to false, by default;\n    - iptables configured to restrict traffic between nodes on specific ports. Configuration is persistent on reboot;\n    - (optional) mirror for docker hub with username and password can be configured by adding to the `terraform-template.json`:\n        ```json\n        \"registry_mirror\": \"mirror.example.com\",\n        \"registry_mirror_user\": \"example\",\n        \"registry_mirror_pass\": \"example\"\n        ```\n\n\n## Usage\n\n### Creating kuberentes cluster\n\n```bash\n# generate keys and load terraform modules\nmake init\n\n# create plan based on template (need to run once)\nmake plan\n\n# apply configuration\nmake apply\n```\n\nOn `make init` new ssh keys are generated only if they don't exist, and the password is generated once. If the keys want to be reused and the key has been removed from the ssh-agent, `export SSH_PASS=\u003ckey\u003e` needs to be used for the `make init` to know how to add the keys to the ssh-agent.\n\n\n### Destroy kubernetes cluster\n\n```bash\n# destroy cluster\n\nmake destroy\n```\n\n## License\n\nMIT License\n\nCode adapted from from https://github.com/hoeghh/rke2-terraform/ which is licensed under MIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblankdots%2Frke2-terraform-libvirt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblankdots%2Frke2-terraform-libvirt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblankdots%2Frke2-terraform-libvirt/lists"}