Skip to content

Commit

Permalink
Update kind
Browse files Browse the repository at this point in the history
- Use kind v0.8.0 and k8s 1.18.2
- Run kind registry on its own network, fix default name
  • Loading branch information
adambkaplan committed Nov 24, 2020
1 parent 1ba8734 commit 8f54809
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions hack/install-kind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
set -eu

# kind version
KIND_VERSION="${KIND_VERSION:-v0.7.0}"
KIND_VERSION="${KIND_VERSION:-v0.8.0}"

if [ ! -f "${GOPATH}/bin/kind" ] ; then
echo "# Installing KinD..."
Expand All @@ -25,7 +25,7 @@ kind --version
KIND_CLUSTER_NAME="${KIND_CLUSTER_NAME:-kind}"

# kind cluster version
KIND_CLUSTER_VERSION="${KIND_CLUSTER_VERSION:-v1.17.0}"
KIND_CLUSTER_VERSION="${KIND_CLUSTER_VERSION:-v1.18.2}"

echo "# Creating a new Kubernetes cluster..."
kind create cluster --quiet --name="${KIND_CLUSTER_NAME}" --image="kindest/node:${KIND_CLUSTER_VERSION}" --wait=120s
Expand Down
5 changes: 3 additions & 2 deletions hack/install-registry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ if [[ ! -z "${ACTION}" ]] && [[ "${ACTION}" != "show" ]] ; then
fi

# contrainer registry name
REGISTRY_NAME="${REGISTRY_NAME:-registry}"
REGISTRY_NAME="${REGISTRY_NAME:-kind-registry}"
# container registry port
REGISTRY_PORT="${REGISTRY_PORT:-5000}"

Expand All @@ -41,6 +41,7 @@ function start_registry () {
--publish="${REGISTRY_PORT}:5000" \
--restart="always" \
--detach \
--net=kind \
registry:2

cat << EOS
Expand All @@ -51,7 +52,7 @@ EOS
}

function show_ipaddr () {
docker inspect --format='{{ .NetworkSettings.IPAddress }}' "${REGISTRY_NAME}"
docker inspect --format='{{ .NetworkSettings.Networks.kind.IPAddress }}' "${REGISTRY_NAME}"
}

if [ "${ACTION}" == "" ] ; then
Expand Down

0 comments on commit 8f54809

Please sign in to comment.