Skip to content

Commit

Permalink
fix kind-with-registry for v0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
BenTheElder committed May 1, 2020
1 parent 38f9bf5 commit ab3205d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions site/static/examples/kind-with-registry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ if [ "${running}" != 'true' ]; then
-d --restart=always -p "${reg_port}:5000" --name "${reg_name}" \
registry:2
fi
reg_ip="$(docker inspect -f '{{.NetworkSettings.IPAddress}}' "${reg_name}")"

# create a cluster with the local registry enabled in containerd
cat <<EOF | kind create cluster --name "${KIND_CLUSTER_NAME}" --config=-
Expand All @@ -22,5 +21,8 @@ apiVersion: kind.x-k8s.io/v1alpha4
containerdConfigPatches:
- |-
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."localhost:${reg_port}"]
endpoint = ["http://${reg_ip}:${reg_port}"]
endpoint = ["http://${reg_name}:${reg_port}"]
EOF

# connect the registry to the cluster network
docker network connect "kind" "${reg_name}"

0 comments on commit ab3205d

Please sign in to comment.