I'm feeling pretty stupid here. I want K8s to pull Docker images from a local registry to ensure my development cycle is as fast as possible.
I have set up the local registry per the instructions and am using an insecure registry. I have pushed images to it, and have confirmed they reside in the registry by looking inside it using VS Code's Docker extension:
I didn't really know whether to use localhost
, $MACHINE_NAME
, or $LOCAL_IP_ADDRESS
, so I did all three.
I can successfully pull an image from these registries via the command line. However, when K8s (running via minikube) attempts to pull, it fails:
Failed to pull image "localhost:5000/service1": rpc error: code = Unknown desc = Error response from daemon: Get http://localhost:5000/v2/: dial tcp 127.0.0.1:5000: connect: connection refused
Why is this and how can I rectify?