{"id":23599811,"url":"https://github.com/devgine/k3s-in-docker","last_synced_at":"2025-11-05T02:30:22.926Z","repository":{"id":267525507,"uuid":"899249898","full_name":"devgine/k3s-in-docker","owner":"devgine","description":"Create you Kubernetes cluster with k3s using docker and Traefik.","archived":false,"fork":false,"pushed_at":"2024-12-10T20:28:25.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-27T11:26:08.713Z","etag":null,"topics":["docker","external-secrets","helm","k3s","k8s","kubectl","kubernetes","mini-cluster","portainer","traefik","vault"],"latest_commit_sha":null,"homepage":"","language":"Makefile","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/devgine.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":"2024-12-05T22:23:57.000Z","updated_at":"2024-12-10T20:28:29.000Z","dependencies_parsed_at":"2024-12-10T21:40:55.022Z","dependency_job_id":null,"html_url":"https://github.com/devgine/k3s-in-docker","commit_stats":null,"previous_names":["devgine/k3s-in-docker"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devgine%2Fk3s-in-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devgine%2Fk3s-in-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devgine%2Fk3s-in-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devgine%2Fk3s-in-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devgine","download_url":"https://codeload.github.com/devgine/k3s-in-docker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239449471,"owners_count":19640530,"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":["docker","external-secrets","helm","k3s","k8s","kubectl","kubernetes","mini-cluster","portainer","traefik","vault"],"created_at":"2024-12-27T11:26:15.391Z","updated_at":"2025-11-05T02:30:22.898Z","avatar_url":"https://github.com/devgine.png","language":"Makefile","readme":"# k3s cluster\n\n## About\nThis repository helps you create a kubernetes cluster locally with [k3s](https://docs.k3s.io/) using `Docker` and `traefik`.\u003cbr\u003e\nAlso it contains all useful utils to manage kubernetes cluster like `kubectl`, `helm` and more\n\n## Requirements\n* git\n* docker\n* docker compose\n* make\n\n## How to\n\n### Install traefik\n\u003e If you already have an installed traefik you can skip this step\n\nFirst, install traefik stack from this repository https://github.com/devgine/traefik\n\n### Clone the project\n```shell\ngit clone git@github.com:devgine/k3s-in-docker.git\n```\n\n### Run containers\n```shell\nmake run\n```\n\nEnjoy ! 🥳\n\n### Traefik dashboard\n\n\u003e https://traefik.k3s.localhost/\n\n## K8S tools\nTo manage kubernetes resources in the cluster, you can connect to the k8s container and run kubectl or helm commands.\u003cbr\u003e\nThis container contains the necessary tools to manage kubernetes cluster.\n\n```shell\nmake shell\n```\n\nBelow is an example to install nginx. You should run it inside the k8s container.\n```shell\nkubectl apply -f 00-nginx.yaml\n```\nVisit http://nginx.k3s.localhost\n\n## Ingress nginx controller\nBy default, traefik is installed as an ingress reverse proxy, if you want to allow ingress nginx follow the following instructions\n\n### Connect to k8s container\n```shell\nmake shell\n```\n### Create namespace\n```shell\nkubectl create ns ingress-nginx\n```\n### Add the helm ingress repository\n```shell\nhelm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx\n```\n### Install nginx ingress controller\n```shell\nhelm install ingress-nginx ingress-nginx/ingress-nginx -n ingress-nginx\n```\n## Routing\nRouter \u003e\u003e *.k3s.localhost \u003e\u003e Docker Traefik \u003e\u003e K3S container \u003e\u003e Ingress (traefik OR nginx) \u003e\u003e Service\n\n## K3S config directories\n\n| Node   | Directory                             | Description                                                                                                                                                    |\n|--------|---------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Server | /output                               | k3s will generate a kubeconfig.yaml in this directory.                                                                                                         |\n| Server | /var/lib/rancher/k3s/server/manifests | This directory is where you put all the (yaml) configuration files of the Kubernetes resources.                                                                |\n| Agent  | /var/lib/rancher/k3s/agent/images     | this is where you would place an alternative traefik image (saved as a .tar file with'docker save'), if you want to use it, instead of the traefik:v3.1 image. |\n\n## Available apps\n* [Install Portainer](.manifests/tools/helm/portainer/README.md)\n* [Install Vault](.manifests/tools/helm/vault/README.md)\n\n## References\nhttps://github.com/its-knowledge-sharing/K3S-Demo/blob/production/docker-compose.yaml\u003cbr\u003e\nhttps://docs.k3s.io/cli/server\u003cbr\u003e\nhttps://thenets.org/how-to-create-a-k3s-cluster-with-nginx-ingress-controller/\u003cbr\u003e\nhttps://blog.stephane-robert.info/post/homelab-ingress-k3s-certificats-self-signed/\n\n### Addons\nhttps://github.com/its-knowledge-sharing/K3S-Demo-Addons\n\n### Custom coredns\nhttps://github.com/owncloud/docs-ocis/issues/716\u003cbr\u003e\nhttps://learn.microsoft.com/en-us/azure/aks/coredns-custom#hosts-plugin\n\n## ISSUES\nhttps://github.com/k3s-io/k3s/issues/11165\u003cbr\u003e\nhttps://github.com/k3s-io/k3s/issues/11173\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevgine%2Fk3s-in-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevgine%2Fk3s-in-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevgine%2Fk3s-in-docker/lists"}