I'm trying to setup a local registry for local development with kubernetes.
I do this by: docker run -d -p 5000:5000 --name registry registry:2
I then build and tag a docker image:
docker tag apiservice localhost:5000/apiservice
push it to the registry:
docker push localhost:5000/apiservice
In my k82 deployment definition:
spec:
containers:
- name: apiserver
image: localhost:5000/apiservice:latest
What do I need to change to use minikube and a local docker container registry?
Are you running the registry on your machine's Docker or the Docker inside minikube? These are separate instances of DOcker, you can make them with:
eval $(minikube docker-env)
as explained here: https://github.com/kubernetes/minikube#reusing-the-docker-daemon
Then you will be able to pull Docker images from your local machine inside minikube.