Add Documentation for registry addon

This commit adds documentation on how to use minikube addon registry.
Related to #4341 and #4529
This addresses #4531 and #4242
pull/4539/head
Om Kumar 2019-06-20 14:19:35 +05:30
parent ead799d7c5
commit 621f165ff7
1 changed files with 32 additions and 0 deletions

View File

@ -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
@ -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
```