When using kURL as your kubernetes distro, you might sometimes want to check which images are loaded in the registry add-on.
By default the embedded registry will run as a Service of type ClusterIp
. So in order to access the registry with regular docker
commands, some minor changes will need to be done:
- From the instance with kURL installed (capture registry password)
kubectl get secret registry-creds -o jsonpath="{.data.\.dockerconfigjson}" | base64 --decode
-
kubectl port-forward --address 0.0.0.0 -n kurl svc/registry 5000:443
Or use the nodeport option
https://kurl.sh/docs/add-ons/registry#advanced-install-options
- From the instance with docker installed
- Update /etc/hosts by adding
[kurl_ip] registry
- Update /etc/docker/daemon.json with
{ "insecure-registries" : ["registry:5000"] }
- Restart docker:
sudo systemctl restart docker
- Run
docker login registry:5000 -u kurl -p [the_password]
- Run
docker pull [regsitry/your-image]
- Run
docker image ls
- Update /etc/hosts by adding