File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -176,6 +176,41 @@ docker run --rm --name docker_registry_proxy -it \
176176 rpardini/docker-registry-proxy:0.6.2
177177```
178178
179+ ### Kind Cluster
180+
181+ [ Kind] ( https://github.com/kubernetes-sigs/kind/ ) is a tool for running local Kubernetes clusters using Docker container “nodes”.
182+
183+ Because cluster nodes are Docker containers, docker-registry-proxy needs to be in the same docker network.
184+
185+ Example joining the _ kind_ docker network and using hostname _ docker-registry-proxy_ as hostname :
186+
187+ ``` bash
188+ docker run --rm --name docker_registry_proxy -it \
189+ --net kind --hostname docker-registry-proxy \
190+ -p 0.0.0.0:3128:3128 -e ENABLE_MANIFEST_CACHE=true \
191+ -v $( pwd) /docker_mirror_cache:/docker_mirror_cache \
192+ -v $( pwd) /docker_mirror_certs:/ca \
193+ rpardini/docker-registry-proxy:0.6.2
194+ ```
195+
196+ Now deploy your Kind cluster and then automatically configure the nodes with the following script :
197+
198+ ``` bash
199+ #! /bin/sh
200+ KIND_NAME=${1-kind}
201+ SETUP_URL=http://docker-registry-proxy:3128/setup/systemd
202+ pids=" "
203+ for NODE in $( kind get nodes --name " $KIND_NAME " ) ; do
204+ docker exec " $NODE " sh -c " \
205+ curl $SETUP_URL \
206+ | sed s/docker\.service/containerd\.service/g \
207+ | sed '/Environment/ s/$/ \" NO_PROXY=127.0.0.0\/8,10.0.0.0\/8,172.16.0.0\/12,192.168.0.0\/16\" /' \
208+ | bash" & pids=" $pids $! " # Configure every node in background
209+ done
210+ wait $pids # Wait for all configurations to end
211+ ```
212+
213+
179214## Configuring the Docker clients using Docker Desktop for Mac
180215
181216Separate instructions for Mac clients available in [ this dedicated Doc Desktop for Mac document] ( Docker-for-Mac.md ) .
You can’t perform that action at this time.
0 commit comments