Update hack/create-cluster.sh
Co-authored-by: Kevin Wang <kevinwzf0126@gmail.com>
This commit is contained in:
parent
7096f8ba43
commit
b6d49901d5
|
@ -36,4 +36,4 @@ kubectl config rename-context "kind-${CLUSTER_NAME}" "${CLUSTER_NAME}" --kubecon
|
|||
# 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 container IP.
|
||||
container_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}"
|
||||
kubectl config set-cluster "${CLUSTER_NAME}" --server="https://${container_ip}:6443" --kubeconfig="${KUBECONFIG}"
|
||||
|
|
Loading…
Reference in New Issue