Automate image pull secret management across multiple Kubernetes namespaces with ease.
In large Kubernetes clusters, teams often need to pull container images from private registries. Manually creating and updating image pull secrets in each namespace is:
- Tedious & Error-Prone ❌
- Time-Consuming ⏳
- Hard to Audit 🔒
ImageSecretSyncOperator streamlines this by providing a central place to define your registry credentials and automatically distributing them to all the namespaces you choose.
-
Define your credentials via a
ClustRegCredCustom Resource. -
Spec your list of target namespaces.
-
Apply the CRD and let the operator:
- Create or update the named image pull secret in each namespace.
- Keep secrets in sync whenever you update the CR.
Example: Operator reads ClustRegCred, then syncs secrets across namespaces.
-
Deploy the Operator
helm install imagesecretsyncoperator \ https://raw.githubusercontent.com/Pradipbabar/ImageSecretSyncOperator/refs/heads/main/imagesecretsyncoperator-0.1.0.tgz \ --namespace image-secret-sync-operator \ --create-namespace
-
Create your
ClustRegCredapiVersion: imageregistrycredential.pradix.io/v1alpha1 kind: ClustRegCred metadata: name: sample-clustregcred namespace: default spec: email: [email protected] username: your-docker-username password: super-secret-password registry: https://index.docker.io/v1/ secretName: my-image-pull-secret namespaces: - default - team-namespace
-
Apply your CR
kubectl apply -f clustregcred-sample.yaml
-
Verify
kubectl get secret my-image-pull-secret -n team-namespace
- Centralized Control: One CR to rule them all.
- Automatic Sync: Secrets are created/updated as you change your CR.
- Namespace Whitelist: Choose exactly where your secrets go.
- Secure Storage: Leverages Kubernetes Secrets and RBAC.
Simply update your ClustRegCred:
kubectl edit clustregcred sample-clustregcred -n defaultThe operator will detect changes and roll out updated secrets to all listed namespaces.
This project is licensed under the Apache 2.0 License. See LICENSE for details.
Enjoy automated registry secret management!