{"id":13510010,"url":"https://github.com/Naman1997/simple-fcos-cluster","last_synced_at":"2025-03-30T15:30:25.993Z","repository":{"id":60949813,"uuid":"533549275","full_name":"Naman1997/simple-fcos-cluster","owner":"Naman1997","description":"A simple kubernetes cluster using Fedora Core OS, Proxmox and k0sctl.","archived":false,"fork":false,"pushed_at":"2025-01-14T04:44:02.000Z","size":329,"stargazers_count":11,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-14T05:35:34.172Z","etag":null,"topics":["coreos","homelab","k0sctl","kubernetes","proxmox","terraform","wireguard"],"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/Naman1997.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":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-07T00:46:04.000Z","updated_at":"2025-01-14T04:41:35.000Z","dependencies_parsed_at":"2023-11-22T03:30:20.042Z","dependency_job_id":"d0866d5c-a3bb-4581-995c-de20c335b17e","html_url":"https://github.com/Naman1997/simple-fcos-cluster","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/Naman1997%2Fsimple-fcos-cluster","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Naman1997%2Fsimple-fcos-cluster/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Naman1997%2Fsimple-fcos-cluster/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Naman1997%2Fsimple-fcos-cluster/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Naman1997","download_url":"https://codeload.github.com/Naman1997/simple-fcos-cluster/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246338569,"owners_count":20761404,"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":["coreos","homelab","k0sctl","kubernetes","proxmox","terraform","wireguard"],"created_at":"2024-08-01T02:01:21.031Z","updated_at":"2025-03-30T15:30:25.988Z","avatar_url":"https://github.com/Naman1997.png","language":"HCL","funding_links":[],"categories":["HCL","terraform"],"sub_categories":[],"readme":"# simple-fcos-cluster\n[![Terraform](https://github.com/Naman1997/simple-fcos-cluster/actions/workflows/terraform.yml/badge.svg)](https://github.com/Naman1997/simple-fcos-cluster/actions/workflows/terraform.yml)\n[![GitHub license](https://img.shields.io/github/license/Naereen/StrapDown.js.svg)](https://github.com/Naman1997/simple-fcos-cluster/blob/main/LICENSE)\n\nA simple kubernetes cluster using Fedora Core OS, Proxmox and k0sctl.\n\n## Dependencies\n\n`Client` refers to the node that will be executing `terraform apply` to create the cluster.\n\n| Dependency | Location |\n| ------ | ------ |\n| [Proxmox](https://www.proxmox.com/en/proxmox-ve) | Proxmox node |\n| [xz](https://en.wikipedia.org/wiki/XZ_Utils) | Proxmox node \u0026 Client |\n| [jq](https://stedolan.github.io/jq/) | Client |\n| [Terraform](https://www.terraform.io/) | Client |\n| [k0sctl](https://github.com/k0sproject/k0sctl) | Client |\n\n\n### Create the terraform.tfvars file\n\nThe variables needed to configure this script are documented in this [doc](https://github.com/Naman1997/simple-fcos-cluster/blob/main/docs/Variables.md).\n\n```\ncp terraform.tfvars.example terraform.tfvars\n# Edit and save the variables according to your liking\nvim terraform.tfvars\n```\n\n## Enable the Snippets feature in Proxmox\n\nIn the proxmox web portal, go to `Datacenter` \u003e `Storage` \u003e Click on `local` \u003e `Edit` \u003e Under `Content` choose `Snippets` \u003e Click on `OK` to save.\n\n![local directory](image.png)\n\n## Creating the cluster\n\n```\nterraform init -upgrade\n# You don't need to run the next command if you're using this repo for the 1st time\n# Only do this if you don't want to reuse the older coreos image existing in the current dir\nrm coreos.qcow2\nterraform plan\n# WARNING: The next command will override ~/.kube/config. Make a backup if needed.\nterraform apply --auto-approve\n```\n\nThe created VMs will reboot twice before `qemu-guest-agent` is able to detect their IP addresses. This can take anywhere from 2-5 mins depending on your hardware.\n\n## Expose your cluster to the internet using an Ingress (Optional)\n\nIt is possible to expose your cluster to the internet over a small vps even if both your vps and your public ips are dynamic. This is possible by setting up dynamic dns for both your internal network and the vps using something like duckdns\nand a docker container to regularly monitor the IP addresses on both ends. A connection can be then made using wireguard to traverse the network between these 2 nodes. This way you can hide your public IP while exposing services to the internet.\n\nProject Link: [wireguard-k8s-lb](https://github.com/Naman1997/wireguard-k8s-lb) (This is one possible implementation)\n\n### Poweroff all VMs in the cluster\n\n```\nansible-playbook -i hosts poweroff.yaml\n```\n\n### Debugging HAProxy\n\n```\nhaproxy -c -f /etc/haproxy/haproxy.cfg\n```\n\n### What about libvirt?\n\nThere is a branch named ['kvm'](https://github.com/Naman1997/simple-fcos-cluster/tree/kvm) in the repo that has steps to create a similar cluster using the 'dmacvicar/libvirt' provider. I won't be maintaining that branch - but it can be used as a frame of reference for someone who wants to create a Core OS based k8s cluster in their homelab.\n\n### Video\n\n[Link](https://youtu.be/zdAQ3Llj3IU)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNaman1997%2Fsimple-fcos-cluster","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FNaman1997%2Fsimple-fcos-cluster","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNaman1997%2Fsimple-fcos-cluster/lists"}