{"id":15176557,"url":"https://github.com/felipelaptrin/image-proxy-cache-harbor","last_synced_at":"2026-02-26T23:31:40.941Z","repository":{"id":253681530,"uuid":"844203677","full_name":"felipelaptrin/image-proxy-cache-harbor","owner":"felipelaptrin","description":"A demo for my blog post about how to implementa a proxy-cache to avoid facing rate-limit pulls of Dockehub","archived":false,"fork":false,"pushed_at":"2024-08-18T17:51:23.000Z","size":9,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-22T18:50:13.139Z","etag":null,"topics":["blog","devbox","harbor","helm","ingress-nginx","kubernetes","metallb","opentofu","terraform"],"latest_commit_sha":null,"homepage":"https://felipetrindade.com/proxy-cache-harbor/","language":"HCL","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/felipelaptrin.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":"2024-08-18T17:32:07.000Z","updated_at":"2024-09-11T02:29:01.000Z","dependencies_parsed_at":"2024-08-18T19:08:12.788Z","dependency_job_id":"327b7f2f-dc8c-48b2-9dbf-12ca5b8d4d60","html_url":"https://github.com/felipelaptrin/image-proxy-cache-harbor","commit_stats":null,"previous_names":["felipelaptrin/image-proxy-cache-harbor"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/felipelaptrin/image-proxy-cache-harbor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipelaptrin%2Fimage-proxy-cache-harbor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipelaptrin%2Fimage-proxy-cache-harbor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipelaptrin%2Fimage-proxy-cache-harbor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipelaptrin%2Fimage-proxy-cache-harbor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/felipelaptrin","download_url":"https://codeload.github.com/felipelaptrin/image-proxy-cache-harbor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipelaptrin%2Fimage-proxy-cache-harbor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29876924,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T22:37:10.609Z","status":"ssl_error","status_checked_at":"2026-02-26T22:37:09.019Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["blog","devbox","harbor","helm","ingress-nginx","kubernetes","metallb","opentofu","terraform"],"created_at":"2024-09-27T13:21:22.815Z","updated_at":"2026-02-26T23:31:40.918Z","avatar_url":"https://github.com/felipelaptrin.png","language":"HCL","readme":"# image-proxy-cache-harbor\n\nThis is a demo repository to support my [Image proxy cache using Harbor](https://felipetrindade.com/proxy-cache-harbor/) blog post. The idea is to use Harbor to proxy-cache images and reduce calls to DockerHub.\n\n## Running this demo\n\nMake sure you have [devbox](https://github.com/jetify-com/devbox) and docker installed.\n\n1) Create a Docker network for the Kind cluster\n\n```sh\ndocker network create --subnet 172.100.0.0/16 custom-kind-network\n```\n\n2) Install dependencies\n\n```sh\ndevbox run init\n```\n\nThis will create a Kind cluster, and install Metallb, Ingress NGINX and Harbor. This will take a few minutes because it waits for all these tools to get ready.\n\n3) Configure Harbor project\n\n```sh\ndevbox run proxy-cache\n```\n\n4) Create Kubernetes secrets for registry credentials\n\n```sh\nkubectl create secret -n default docker-registry regcred-harbor \\\n  --docker-server=harbor.ingress.local \\\n  --docker-username=admin \\\n  --docker-password=admin\n```\n\n5) Allow insecure registries\n\nSSH into the Kubernetes node\n\n```sh\ndocker exec -it kind-worker bash\n```\n\nThen run\n\n```sh\napt-get update\napt install vim -y\nvim /etc/containerd/config.toml\n```\n\nAdd the following lines to the file\n\n```toml\n[plugins.\"io.containerd.grpc.v1.cri\".registry]\n[plugins.\"io.containerd.grpc.v1.cri\".registry.mirrors]\n  [plugins.\"io.containerd.grpc.v1.cri\".registry.mirrors.\"harbor.ingress.local\"]\n    endpoint = [\"https://harbor.ingress.local\"]\n  [plugins.\"io.containerd.grpc.v1.cri\".registry.configs.\"harbor.ingress.local\".tls]\n    insecure_skip_verify = true\n[plugins.\"io.containerd.grpc.v1.cri\".registry.configs.\"harbor.ingress.local\".auth]\n  username = \"admin\"\n  password = \"admin\"\n```\n\nFinally restart containerd\n\n```sh\nsystemctl restart containerd\nexit\n```\n\n6) Deploy an application that uses Kustomize\n\n```sh\ndevbox run app-with-kustomize\n```\n\n7) Deploy an application that uses Helm Chart\n\n```sh\ndevbox run app-with-helm\n```\n\n8) Add Harbor URL to /etc/hosts\n\n```sh\nINGRESS_LB_IP=$(kubectl get svc ingress-nginx-controller -n ingress-nginx -o jsonpath='{.status.loadBalancer.ingress[0].ip}')\necho \"$INGRESS_LB_IP harbor.ingress.local\" | sudo tee -a /etc/hosts\n```\n\n9) Access Harbor UI\n\nAccess `https://harbor.ingress.local` and use `admin` as username and `admin` as password. Notice that a project called `proxy_cache` was created and have 2 repositories caches.\n\n10) Destroy everything\n\n```sh\ndevbox run destroy\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffelipelaptrin%2Fimage-proxy-cache-harbor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffelipelaptrin%2Fimage-proxy-cache-harbor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffelipelaptrin%2Fimage-proxy-cache-harbor/lists"}