Reputation: 965
I set up an OpenShift cluster using oc cluster up. Now I want to directly access the internal registry, but I am not able to find out the correct url. I already searched a lot for this, but it seems that all the potential solutions don´t point me to the correct way to find out. I was hoping there´s something like docker-registry.:5000 but I get a connection refused when using it for docker login. I already tried:
docker login -u developer -p "$(oc whoami -t)" docker-registry.<hostname>:5000
docker login -u developer -p "$(oc whoami -t)" registry.<hostname>:5000
docker login -u developer -p "$(oc whoami -t)" <hostname>:5000
Can you help me?
Kind regards
Upvotes: 4
Views: 1176
Reputation: 965
Ok, I found out by myself: I had to login as admin using oc login -u system:admin. Then I got the registry IP by switching to the default namespace and getting the services:
oc project default
oc get svc
which gave my the following output:
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
docker-registry ClusterIP 172.30.1.1 <none> 5000/TCP 9m
kubernetes ClusterIP 172.30.0.1 <none> 443/TCP,53/UDP,53/TCP 9m
router ClusterIP 172.30.100.230 <none> 80/TCP,443/TCP,1936/TCP 9m
I was then able to login using docker:
docker login -u developer -p "$(oc whoami -t)" 172.30.1.1:5000
Hope this helps anybody
Upvotes: 3