Skip to content

Commit 621f165

Browse files
committed
Add Documentation for registry addon
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
1 parent ead799d commit 621f165

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

docs/reusing_the_docker_daemon.md

+32
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ You should now be able to use docker on the command line on your host mac/linux
1414
docker ps
1515
```
1616

17+
Docker may report following forbidden error if you are using http proxy and the `$(minikube ip)` is not added to `no_proxy`/`NO_PROXY`:
18+
19+
```shell
20+
error during connect: Get https://192.168.39.98:2376/v1.39/containers/json: Forbidden
21+
```
22+
1723
On Centos 7, docker may report the following error:
1824

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

3339
Remember to turn off the _imagePullPolicy:Always_, as otherwise Kubernetes won't use images you built locally.
40+
41+
Another approach is to enable minikube registry addons and then push images directly into registry. Steps for this approach is as follows:
42+
43+
Enable minikube registry addon:
44+
45+
```shell
46+
minikube addons enable registry
47+
```
48+
49+
Build docker image and tag it appropriately:
50+
51+
```shell
52+
docker build --tag $(minikube ip):5000/test-img .
53+
```
54+
55+
Push docker image to minikube registry:
56+
57+
```shell
58+
docker push $(minikube ip):5000/test-img
59+
```
60+
61+
Now run it in minikube:
62+
63+
```shell
64+
kubectl run test-img --image=$(minikube ip):5000/test-img
65+
```

0 commit comments

Comments
 (0)