I am running Harbor Registry on my cluster and I have no problem pushing and pulling the images from outside of the cluster.
Now I'd like to be able to create a pod from that registry. Something like this:
.
kubectl run -i --tty --rm debug --image=harbor.harbor.svc.cluster.local/test/alpine:latest --restart=Never -- sh
.
Is this possible?
Update
If I try to access the registry by its service name harbor.harbor.svc.cluster.local
it doesn't work because the host name is not found.
How can I reference my image?
Yes it is possible. There is also concept of local registry which is part of cluster and you can pull images from their. Even OpenShift come with local registry.
Well, this is not a single setup invocation as the one you envisage. There are a set of steps (read as prerequisites) you must follow to get this sorted:
As @Rajesh mentioned in comment, you need to create NodePort type service if you are on same subnet with your nodes or if you are using some cloud for your cluster such as AWS, GKE, also you can create LoadBalancer type service and access through External Loadbalancer to your registry.