- Understanding image naming conventions
- Working with secure image registries
- Configuring Pods to pull from private repositories
Understanding Image Names
Docker interpretsimage: nginx as library/nginx under the hood. The full naming convention is:
- Omit the registry → defaults to Docker Hub (
docker.io) - Omit the namespace → defaults to
library(the official account)
Specifying:is equivalent to:
Common Public Registries
Using a Private Registry
For in-house applications, you can host your own registry or use a managed solution:
To pull from a private registry, follow these steps:
- Authenticate locally (for pushing and testing)
Avoid committing
Store credentials securely (e.g., using a secrets manager).
~/.docker/config.json to version control.Store credentials securely (e.g., using a secrets manager).
-
Create a Kubernetes Secret of type
docker-registryso worker nodes can pull the image: -
Reference the Secret in your Pod spec under
imagePullSecrets:When this Pod is scheduled, the kubelet uses the Secret to authenticate and pull the private image.