Skip to content

Commit 149da3b

Browse files
authored
docs: k3d integration (#112)
* docs: k3d integration - Closes #111 * Update README.md
1 parent 51ce564 commit 149da3b

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

Diff for: README.md

+46
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,52 @@ done
210210
wait $pids # Wait for all configurations to end
211211
```
212212

213+
### K3D Cluster
214+
215+
[K3d](https://k3d.io/) is similar to Kind but is based on k3s. In order to run with its registry you need to setup settings like shown below.
216+
217+
```sh
218+
# docker-registry-proxy
219+
docker run -d --name registry-proxy --restart=always \
220+
-v /tmp/registry-proxy/mirror_cache:/docker_mirror_cache \
221+
-v /tmp/registry-proxy/certs:/ca \
222+
rpardini/docker-registry-proxy:0.6.4
223+
224+
export PROXY_HOST=registry-proxy
225+
export PROXY_PORT=3128
226+
export NOPROXY_LIST="localhost,127.0.0.1,0.0.0.0,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,.local,.svc"
227+
228+
cat <<EOF > /etc/k3d-proxy-config.yaml
229+
apiVersion: k3d.io/v1alpha3
230+
kind: Simple
231+
name: mycluster
232+
servers: 1
233+
agents: 0
234+
options:
235+
k3d:
236+
wait: true
237+
timeout: "60s"
238+
kubeconfig:
239+
updateDefaultKubeconfig: true
240+
switchCurrentContext: true
241+
env:
242+
- envVar: HTTP_PROXY=http://$PROXY_HOST:$PROXY_PORT
243+
nodeFilters:
244+
- all
245+
- envVar: HTTPS_PROXY=http://$PROXY_HOST:$PROXY_PORT
246+
nodeFilters:
247+
- all
248+
- envVar: NO_PROXY='$NOPROXY_LIST'
249+
nodeFilters:
250+
- all
251+
volumes:
252+
- volume: $REGISTRY_DIR/docker_mirror_certs/ca.crt:/etc/ssl/certs/registry-proxy-ca.pem
253+
nodeFilters:
254+
- all
255+
EOF
256+
257+
k3d cluster create --config /etc/k3d-proxy-config.yaml
258+
```
213259

214260
## Configuring the Docker clients using Docker Desktop for Mac
215261

0 commit comments

Comments
 (0)