Skip to content

Commit

Permalink
Add Documentation for registry addon
Browse files Browse the repository at this point in the history
This commit adds documentation on how to use minikube addon registry.
Related to kubernetes#4341 and kubernetes#4529
This addresses kubernetes#4531 and kubernetes#4242
  • Loading branch information
kumarom committed Jun 20, 2019
1 parent ead799d commit 621f165
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions docs/reusing_the_docker_daemon.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ You should now be able to use docker on the command line on your host mac/linux
docker ps
```

Docker may report following forbidden error if you are using http proxy and the `$(minikube ip)` is not added to `no_proxy`/`NO_PROXY`:

```shell
error during connect: Get https://192.168.39.98:2376/v1.39/containers/json: Forbidden
```

On Centos 7, docker may report the following error:

```shell
Expand All @@ -31,3 +37,29 @@ The fix is to update /etc/sysconfig/docker to ensure that minikube's environment
```

Remember to turn off the _imagePullPolicy:Always_, as otherwise Kubernetes won't use images you built locally.

Another approach is to enable minikube registry addons and then push images directly into registry. Steps for this approach is as follows:

Enable minikube registry addon:

```shell
minikube addons enable registry
```

Build docker image and tag it appropriately:

```shell
docker build --tag $(minikube ip):5000/test-img .
```

Push docker image to minikube registry:

```shell
docker push $(minikube ip):5000/test-img
```

Now run it in minikube:

```shell
kubectl run test-img --image=$(minikube ip):5000/test-img
```

0 comments on commit 621f165

Please sign in to comment.