{"id":25289150,"url":"https://github.com/voronenko/k0s-mini","last_synced_at":"2026-01-20T14:33:36.685Z","repository":{"id":277139553,"uuid":"921131143","full_name":"Voronenko/k0s-mini","owner":"Voronenko","description":"Mini K0S cluster on vagrant/virtualbox for own usage","archived":false,"fork":false,"pushed_at":"2025-03-05T14:26:50.000Z","size":47,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-06T17:52:20.567Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Makefile","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/Voronenko.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":"2025-01-23T11:52:33.000Z","updated_at":"2025-03-05T14:26:54.000Z","dependencies_parsed_at":"2025-04-06T17:47:12.575Z","dependency_job_id":"fe251b77-9a92-4003-aa83-16d435ce583c","html_url":"https://github.com/Voronenko/k0s-mini","commit_stats":null,"previous_names":["voronenko/k0s-mini"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Voronenko/k0s-mini","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Voronenko%2Fk0s-mini","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Voronenko%2Fk0s-mini/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Voronenko%2Fk0s-mini/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Voronenko%2Fk0s-mini/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Voronenko","download_url":"https://codeload.github.com/Voronenko/k0s-mini/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Voronenko%2Fk0s-mini/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28604937,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T12:01:53.233Z","status":"ssl_error","status_checked_at":"2026-01-20T12:01:46.545Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2025-02-12T23:50:26.933Z","updated_at":"2026-01-20T14:33:36.664Z","avatar_url":"https://github.com/Voronenko.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"Based on \n\nhttps://github.com/rgl/k0s-vagrant/tree/main\n\n## Extra config\n\nHelm charts\n\nhttps://docs.k0sproject.io/stable/helm-charts/\n\n\n## Theory\n###  What is k0s?\nk0s is a lightweight Kubernetes distribution from the team behind Lens. The “zero” in k0s aptly represents the distro’s zero compromises, dependencies, or downtime issues.\n\nk0s is easy to run anywhere – bare metal, on-prem, locally, and on any cloud provider. It doesn’t have any dependencies and is distributed in a single binary. With k0s, you don’t have to worry excessively about config (unlike many k8s options), and can get a cluster spun up within minutes — all important considerations for local dev or other lightweight use cases.\n\n### What is k3s?\nRancher’s k3s is a lightweight yet highly configurable Kubernetes distribution. k3s’ name reflects its status as the smaller cousin of traditional k8s, and thus has half the characters represented (ten total letters versus five). However, unlike k8s, there is no “unabbreviated” word form of k3s.\n\nk3s is also distributed as a dependency-free, single binary. It helps engineers achieve a close approximation of production infrastructure while only needing a fraction of the compute, config, and complexity, which all result in faster runtimes.\n\n### K0s vs K3s\nk0s and k3s are both CNCF-certified k8s distributions, and meet all the benchmarks/requirements for standard k8s clusters. They’re both good options for teams looking for lighter-weight and easy to configure cluster solutions.\n\nCluster architecture\nk3s supports both single and multi-node clusters. Its control plane defaults to SQLite for its embedded datastore on all cluster types, and multi-node clusters can be configured to use MySQL, PostgreSQL, and etcd.\n\nk0s also accommodates single and multi-node clusters. Its datastore defaults to SQLite for single-node clusters, and to etcd for multi-node clusters. The datastore can also be configured to use PostgreSQL and MySQL.\n\nLike standard k8s, k0s has a distinct separation between worker and control planes, which can be distributed across multiple nodes.\n\nBoth distros use containerd for their container runtimes. k0s ships without a built-in ingress controller; stock k3s comes with Traefik.\n\n### k0s.yaml\n\nAllows auto-configuration of k0s cluster. Check for some hints and examples:\n\nWorking with helm charts:\n\nhttps://docs.k0sproject.io/v1.32.1+k0s.0/helm-charts/\n\n#### Nginx ingress controller:\nhttps://docs.k0sproject.io/v1.32.1+k0s.0/examples/nginx-ingress/\nhttps://blog.helmuth.at/2024/11/k0s-ingress-part2/\n\n\n#### Metal load balancer\n\nhttps://docs.k0sproject.io/v1.32.1+k0s.0/examples/metallb-loadbalancer/\n\nFor manual experimentation\n\n```sh\nhelm-install-metallb:\n        helm upgrade --install metallb metallb/metallb --create-namespace --namespace metallb-system --wait\n        kubectl apply -f deployment/k0s/metallb/metallb-l2-pool.yaml\n```\n\nSome ideas for networks from your home router to associate\n```\n192.168.3.192/28\t192.168.3.192 - 192.168.3.207\t192.168.3.193 - 192.168.3.206\t14\t\t\t\t\n192.168.3.208/28\t192.168.3.208 - 192.168.3.223\t192.168.3.209 - 192.168.3.222\t14\t\t\n192.168.3.224/28\t192.168.3.224 - 192.168.3.239\t192.168.3.225 - 192.168.3.238\t14\t\t\n192.168.3.240/28\t192.168.3.240 - 192.168.3.255\t192.168.3.241 - 192.168.3.254\t14\t\n```\n\nwhich you need additionally to route to any vagrant machine\n\n`sudo ip route add 192.168.3.192/28 via 192.168.56.7`\n\n\n#### Traefik load balancer\n\n```sh\n\nhelm-install-traefik:\n  helm install --namespace=traefik traefik traefik/traefik\n```\n\nAfter you installed both, metallb and traefik, you should be able to discover external IP for traefik:\nNote EXTERNAL-IP is the IP of the same vagrant cluster machine where you installed traefik\nOn your machine it should be accessible.\n\n```shell\nkubectl get all\nAlias tip: kga\nNAME                           READY   STATUS    RESTARTS   AGE\npod/traefik-7bc5f58897-2hcm8   1/1     Running   0          31s\n\nNAME              TYPE           CLUSTER-IP       EXTERNAL-IP     PORT(S)                      AGE\nservice/traefik   LoadBalancer   10.103.118.147   192.168.3.201   80:31449/TCP,443:30821/TCP   31s\n\nNAME                      READY   UP-TO-DATE   AVAILABLE   AGE\ndeployment.apps/traefik   1/1     1            1           31s\n\nNAME                                 DESIRED   CURRENT   READY   AGE\nreplicaset.apps/traefik-7bc5f58897   1         1         1       31s\n```\n\n\n## After vagrant up, you have:\n\n### nodes\n```\n kubectl get nodes\nAlias tip: kgno\nNAME    STATUS   ROLES    AGE   VERSION\nnode1   Ready    \u003cnone\u003e   30m   v1.31.5+k0s\nnode2   Ready    \u003cnone\u003e   30m   v1.31.5+k0s\n```\n\n### Metalb load balancer should be available\n\n\nIn order to proceed further, you need to have a load balancer available for the Kubernetes cluster.\nShould you have difficulties out of the box, you can use the following example.\n\nTo verify that it's available, deploy a simple load balancer service.\n\n```yaml\napiVersion: v1\nkind: Service\nmetadata:\n  name: example-load-balancer\nspec:\n  selector:\n    app: web\n  ports:\n    - protocol: TCP\n      port: 80\n      targetPort: 80\n  type: LoadBalancer\n```\n\n`kubectl apply -f example-load-balancer.yaml`\n\nThen run the following command to see your LoadBalancer with an external IP address.\n\n`kubectl get service example-load-balancer`\n\nIf the LoadBalancer is not available, you won't get an IP address for EXTERNAL-IP. Instead, it's `\u003cpending\u003e`. In this case you should go back to the previous step and check your load balancer availability.\n\nIf you are successful, you'll see a real IP address and you can proceed further.\n\nYou can delete the example-load-balancer:\n\n`kubectl delete -f example-load-balancer.yaml`\n\n\n### longhorn storage class\n\ndefining storage classes based on longhorn you could potentially easier imitate storage classes used in \nprod environment, so that your experiment would have as less differences as possible\n\n```shell\nkubectl get storageclass\nAlias tip: k get storageclass\nNAME                 PROVISIONER          RECLAIMPOLICY   VOLUMEBINDINGMODE   ALLOWVOLUMEEXPANSION   AGE\nlonghorn (default)   driver.longhorn.io   Delete          Immediate           true                   24h\nlonghorn-static      driver.longhorn.io   Delete          Immediate           true                   24h\n```\n\nWith UI on https://vg-longhorn.fiks.im/\n\n```sh\nkubectl get storageclasses\nAlias tip: k get storageclasses\nNAME                 PROVISIONER          RECLAIMPOLICY   VOLUMEBINDINGMODE   ALLOWVOLUMEEXPANSION   AGE\nlonghorn (default)   driver.longhorn.io   Delete          Immediate           true                   18m\nlonghorn-static      driver.longhorn.io   Delete          Immediate           true                   18m\n```\n\n### Traefik ingress controller\n\nWith UI on https://vg-traefik.fiks.im/dashboard/#/\n\nBy default, cluster is based on \"fiks.im\" local development environment, with few addresses overwritten\nvia /etc/hosts. You can always get up-to-date green seal certificates from https://github.com/Voronenko/fiks.im\n\nTest deployment \n\n\n### Nginx ingress controller\n\nNote, that applying after traefik ingress controller, it will use next public IP available to metallb cluster load\nbalancer, thus you should point nginx enabled services to that IP, don't be confused.\n\nShould you test, deploy dummy-nginx-test app, which should be available on https://vg-dummy.fiks.im/\n\nideas for usage\n\n```yaml\n  apiVersion: networking.k8s.io/v1\n  kind: Ingress\n  metadata:\n    name: example\n    namespace: foo\n  spec:\n    ingressClassName: nginx\n    rules:\n      - host: www.example.com\n        http:\n          paths:\n            - pathType: Prefix\n              backend:\n                service:\n                  name: exampleService\n                  port:\n                    number: 80\n              path: /\n    # This section is only required if TLS is to be enabled for the Ingress\n    tls:\n      - hosts:\n        - www.example.com\n        secretName: example-tls\n\nIf TLS is enabled for the Ingress, a Secret containing the certificate and key must also be provided:\n\n  apiVersion: v1\n  kind: Secret\n  metadata:\n    name: example-tls\n    namespace: foo\n  data:\n    tls.crt: \u003cbase64 encoded cert\u003e\n    tls.key: \u003cbase64 encoded key\u003e\n  type: kubernetes.io/tls\n```\n\n## Tools and notes\n\nVisual subnet calculator\nhttps://www.davidc.net/sites/default/subnets/subnets.html\n\n\n## Troubleshouting\n\n### Optimize space\n\nChange default replica count for volumes to 1 from kubernetes default 3\n\n`kubectl edit cm longhorn-storageclass -n longhorn-system`\nkubectl edit cm longhorn-storageclass -n longhorn-system\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoronenko%2Fk0s-mini","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvoronenko%2Fk0s-mini","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoronenko%2Fk0s-mini/lists"}