Skip to content

Commit

Permalink
simplify script for v0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
BenTheElder committed May 1, 2020
1 parent 4f9eca2 commit daa1c81
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions site/static/examples/kind-with-registry.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
#!/bin/sh
set -o errexit

# desired cluster name; default is "kind"
KIND_CLUSTER_NAME="${KIND_CLUSTER_NAME:-kind}"

# create registry container unless it already exists
reg_name='kind-registry'
reg_port='5000'
Expand All @@ -15,10 +12,10 @@ if [ "${running}" != 'true' ]; then
fi

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

# tell https://tilt.dev to use the registry
for node in $(kind get nodes --name "${KIND_CLUSTER_NAME}"); do
for node in $(kind get nodes); do
kubectl annotate node "${node}" "tilt.dev/registry=localhost:${reg_port}";
done

0 comments on commit daa1c81

Please sign in to comment.