Container Registry Config Generator
Generate docker login commands, Kubernetes imagePullSecret YAML, and GitHub Actions steps for your registry. Supports DockerHub, ECR, GCR, ACR, and GHCR.
Registry Configuration
Use an access token, not your account password.
Frequently Asked Questions
What is an imagePullSecret in Kubernetes?▼
An imagePullSecret is a Kubernetes Secret that holds container registry credentials. When specified in a Pod spec, Kubernetes uses it to authenticate with a private registry before pulling images. Without it, pulling from private registries returns 401 Unauthorized (ImagePullBackOff). Create it with: kubectl create secret docker-registry.
What is the difference between ECR, GCR, ACR, and GHCR?▼
ECR (Elastic Container Registry) is AWS's managed registry, integrated with IAM. GCR (Google Container Registry) / Artifact Registry is GCP's registry. ACR (Azure Container Registry) is Azure's registry. GHCR (GitHub Container Registry) is GitHub's free registry for public/private images. Each has different auth methods: ECR uses AWS tokens (short-lived), others typically use static credentials or service accounts.
How do ECR credentials work with Kubernetes?▼
AWS ECR tokens expire after 12 hours, which breaks static imagePullSecrets. Solutions: (1) Use ECR credential helper (aws-ecr-credential-provider as a node plugin), (2) Use a CronJob to refresh the secret every 6 hours, or (3) Use IAM roles for service accounts (IRSA) with kube2iam/KIAM on EKS. Option 3 is the production-grade approach.
How do I use GHCR in GitHub Actions?▼
GHCR integrates natively with GitHub Actions via GITHUB_TOKEN (no PAT needed for same-repo images). Use: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin. Then push to ghcr.io/<org>/<image>:<tag>. For pulling from other repos, create a PAT with read:packages scope.
Should I use a Personal Access Token or Service Account for registry auth?▼
For production, always use service accounts / machine credentials, never personal tokens. PATs are tied to individual users — if that person leaves, access breaks. Use: Docker Hub organization access tokens, AWS IAM roles, GCP Service Accounts with Workload Identity, or ACR service principals. Store credentials in Kubernetes Secrets, never in Dockerfiles or source code.
How do I configure imagePullSecrets for all pods in a namespace?▼
Attach the imagePullSecret to the default ServiceAccount in the namespace: kubectl patch serviceaccount default -p '{"imagePullSecrets": [{"name": "regcred"}]}' -n <namespace>. All pods that don't specify a serviceAccountName will inherit it. This avoids adding imagePullSecrets to every Deployment manually.
Related Products
on GumroadGitHub Actions CI/CD Templates Pack
12 production-ready GitHub Actions workflow templates covering Node.js, Python, Docker, multi-environment deployments, security scanning, and auto-changelog. Copy, paste, ship.
Buy on Gumroad →Premium Workflow Pack
Production-grade workflows, architecture guides, and deployment scripts for teams that ship. 10 advanced CI/CD workflows (blue-green, canary, E2E, security), 5 architecture deep-dives, code review checklist, PR process guide, and 5 battle-tested Bash deployment scripts.
Buy on Gumroad →Developer Productivity Bundle
Stop rebuilding the same setup every project. 51 VSCode snippets, 40 Git aliases, 5 Docker Compose stacks, 5 GitHub Actions workflows, 5 README templates, and a dotfiles kit. Set up a professional dev environment in under an hour.
Buy on Gumroad →You Might Also Need
Docker Run Command Builder
Build complete docker run commands visually. Configure image, ports, volumes, environment variables, network, restart policy, detached mode, and more. Generates the exact docker run command.
Open free tool →
Dockerfile Linter
Paste your Dockerfile and instantly check for common issues: latest tags, missing HEALTHCHECK, running as root, cache-busting COPY order, ADD vs COPY, and multi-stage build suggestions.
Open free tool →
Dockerfile Generator
Interactive wizard to generate production-ready Dockerfiles for Node.js, Python, Go, Java, and Rust. Multi-stage builds, port config, custom layers.
Open free tool →
More Free Tools
Related Articles
Pulumi vs Terraform 2026: Which IaC Tool Should You Choose?
A deep comparison of Pulumi and Terraform for infrastructure as code in 2026. Covers syntax, state management, provider ecosystem, team adoption, and when to choose each tool.
Cloud Cost Optimization in 2026: Strategies, Tools, and Real-World Savings
Cut your cloud bill without cutting performance. This practical guide covers FinOps practices, cost allocation, resource optimization, reserved capacity strategies, and the tools that help engineering teams understand and reduce cloud spend.
Cloud Deployment Tools in 2026: From Containers to Serverless
A practical guide to cloud deployment tools in 2026. Compare deployment strategies, container platforms, serverless frameworks, and GitOps workflows that enterprise teams use to ship software reliably.
Docker Compose vs Kubernetes: When to Use Each (2026)
A practical guide to choosing between Docker Compose and Kubernetes in 2026. Compare complexity, use cases, cost, and learn when to migrate from one to the other.
Docker Multi-Stage Builds: Reduce Image Size by 90% with Real Examples
Learn Docker multi-stage builds to dramatically reduce image size. Real examples showing 1.2GB → 23MB reduction for Node.js, Python, and Go applications.
Enjoying this tool? Get more like it.
Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.
Unlock AI-Powered Dev Tools
- ⚡ AI Code Review, Doc Generator & SQL Builder
- ⚡ All premium templates & early access
- ⚡ Member discounts on Gumroad products
$9/mo after trial · Cancel anytime
Want the full toolkit?
Get DevPlaybook Pro
Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.
MIT licensed · Instant download · No subscription
See what's included → Browse all deals →