{"id":21659932,"url":"https://github.com/tilt-dev/k3d-local-registry","last_synced_at":"2025-07-17T23:30:28.012Z","repository":{"id":52829758,"uuid":"241475220","full_name":"tilt-dev/k3d-local-registry","owner":"tilt-dev","description":"Easy set-up (via k3d) for k3s cluster with local registry for use with Tilt","archived":true,"fork":false,"pushed_at":"2023-05-02T17:28:20.000Z","size":14,"stargazers_count":33,"open_issues_count":0,"forks_count":11,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-11-25T09:45:10.734Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tilt-dev.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":"2020-02-18T21:51:36.000Z","updated_at":"2024-01-27T20:09:37.000Z","dependencies_parsed_at":"2024-11-25T09:43:58.888Z","dependency_job_id":null,"html_url":"https://github.com/tilt-dev/k3d-local-registry","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tilt-dev/k3d-local-registry","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tilt-dev%2Fk3d-local-registry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tilt-dev%2Fk3d-local-registry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tilt-dev%2Fk3d-local-registry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tilt-dev%2Fk3d-local-registry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tilt-dev","download_url":"https://codeload.github.com/tilt-dev/k3d-local-registry/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tilt-dev%2Fk3d-local-registry/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265678448,"owners_count":23810114,"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":[],"created_at":"2024-11-25T09:31:54.188Z","updated_at":"2025-07-17T23:30:27.675Z","avatar_url":"https://github.com/tilt-dev.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"# k3d-local-registry\n\n## UPDATE(2023-05-02)\n\nAs of k3d v4.0, k3d has a built-in local registry. \n\nTilt-team has worked with K3d team to ensure that the built-in registry supports all the same\nauto-discovery features as this script. You no longer need this script.\n\nFor instructions, see [Using a Local Registry](https://k3d.io/v5.4.9/usage/registries/#using-a-local-registry).\n\nWe can also use [ctlptl](http://github.com/tilt-dev/ctlptl), which implements a more declarative\napproach to setting up local clusters.\n\nThis repo will be archived for posterity.\n\n---\n\n## Why\n\nWhen using Tilt with a [k3s](https://k3s.io/) cluster, we recommend using a local registry for faster image pushing and pulling.\n\nThis repo provides a script to help you set up your cluster (via [k3d](https://github.com/rancher/k3d/))\nwith a local image registry that Tilt can auto-detect, so you don't need to do any additional configuration,\nand Tilt knows where to push/pull your images to/from.\n\n## How to Try It\n\n1) Install [k3d](https://github.com/rancher/k3d/) (note: these instructions require **k3d v1.x**)\n\n2) Copy the [k3d-with-registry.sh](k3d-with-registry.sh) script somewhere on your path.\n\n3) Create a cluster with `k3d-with-registry.sh`. Currently it uses the default registry name `registry.local` and default port `5000`.\n\n```\nk3d-with-registry.sh\n```\n\n4) Verify your registry:\n\n```\ndocker pull nginx:latest\ndocker tag nginx:latest localhost:5000/nginx:latest\ndocker push localhost:5000/nginx:latest\n```\n\nSet your KUBECONFIG as specified in script output (e.g. `export KUBECONFIG=\"$(k3d get-kubeconfig --name='diffname')\"`)\nand try spinning up a pod that references an image in your registry:\n\n```\ncat \u003c\u003cEOF | kubectl apply -f -\napiVersion: apps/v1\nkind: Deployment\nmetadata:\n  name: nginx-test-registry\n  labels:\n    app: nginx-test-registry\nspec:\n  replicas: 1\n  selector:\n    matchLabels:\n      app: nginx-test-registry\n  template:\n    metadata:\n      labels:\n        app: nginx-test-registry\n    spec:\n      containers:\n      - name: nginx-test-registry\n        image: registry.local:5000/nginx:latest\n        ports:\n        - containerPort: 80\nEOF\n```\n\nVerify the pod spun up correct with: `kubectl get pods -l \"app=nginx-test-registry\"`\n\nCongrats! You can now push images to `localhost:5000/xxx`, and reference them in your k8s YAML as `registry.local:5000/xxx`.\n\n[Tilt](https://tilt.dev) will automatically detect the local registry created by this script,\nand do the image tagging dance (as of Tilt v0.12.0). In your Tiltfle and in your K8s YAML, just\nrefer to the image as `my-image`, and Tilt will take care of prepending `localhost:5000` etc. as appropriate.\n\n## See also\n\n* More info on [using registries with k3d](https://github.com/rancher/k3d/blob/master/docs/registries.md)\n* The [Tilt + local registries guide for Kind](https://github.com/windmilleng/kind-local), which employs a similar pattern\n\n## License\n\nCopyright 2020 Windmill Engineering\n\nLicensed under [the Apache License, Version 2.0](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftilt-dev%2Fk3d-local-registry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftilt-dev%2Fk3d-local-registry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftilt-dev%2Fk3d-local-registry/lists"}