ARTIFACTORY: How to proxy https://registry.k8s.io using Artifactory
1. Create a Docker Remote Repository:
- Open your Artifactory instance and create a new Docker remote repository.
- Set the repository URL to https://registry.k8s.io .
- Ensure that all other parameters remain at their default settings
2. Connect Docker Client to Artifactory, For example, in case you use the repository path method in other case kindly refer to the docker documentation:
- Use the following command to connect your Docker client to Artifactory. Replace <HOST_NAME> with the appropriate hostname.
“docker login <HOSTNAME>”
- Use the following command to pull images from Artifactory
"docker pull <HOSTNAME>/<REPOSITORY_NAME>/<IMAGE_NAME>:<TAG>"
Important note: A remote repository serves as a proxy, not a mirror. It doesn't pre-fetch artifacts into its cache. Instead, artifacts are retrieved and stored in the cache only when requested by a client.
Hence, when you create a remote repository, it won't initially have any artifacts in its cache. The cache is populated with artifacts as clients interact with the remote repository and make requests.