diff --git a/hack/create-cluster.sh b/hack/create-cluster.sh index 644646580..1e76198f6 100755 --- a/hack/create-cluster.sh +++ b/hack/create-cluster.sh @@ -34,6 +34,6 @@ kind create cluster --name "${CLUSTER_NAME}" --kubeconfig="${KUBECONFIG}" --wait kubectl config rename-context "kind-${CLUSTER_NAME}" "${CLUSTER_NAME}" --kubeconfig="${KUBECONFIG}" # Kind cluster uses `127.0.0.1` as kube-apiserver endpoint by default, thus kind clusters can't reach each other. -# So we need to update endpoint with docker IP. +# So we need to update endpoint with container IP. docker_ip=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' "${CLUSTER_NAME}-control-plane") kubectl config set-cluster "${CLUSTER_NAME}" --server="https://${docker_ip}:6443" --kubeconfig="${KUBECONFIG}"