diff --git a/pkg/provider/ibmcloud/action/kind/cloud-config b/pkg/provider/ibmcloud/action/kind/cloud-config index 2e74db226..44107b0f3 100644 --- a/pkg/provider/ibmcloud/action/kind/cloud-config +++ b/pkg/provider/ibmcloud/action/kind/cloud-config @@ -53,6 +53,7 @@ runcmd: - cmdKubeconfig="kind get kubeconfig --name kind-mapt > kubeconfig" - cmdCheckCluster="kubectl --request-timeout=3s --insecure-skip-tls-verify --kubeconfig kubeconfig get node >/dev/null 2>&1" - until eval $cmdCheckCluster; do sleep 5; eval $cmdKubeconfig; done + - sed -i 's#https://0.0.0.0:6443#https://127.0.0.1:6443#' /kubeconfig # Verify control-plane stability before exporting the kubeconfig. # The basic API check above only confirms the API server accepts a # single request. Control-plane pods may still restart during the @@ -65,7 +66,7 @@ runcmd: - | #!/bin/bash set -e - export KUBECONFIG=/root/kubeconfig + export KUBECONFIG=/kubeconfig MAX_WAIT=300 START=$SECONDS echo "Waiting for control-plane pods to reach Ready state..." diff --git a/pkg/target/service/kind/cloud-config b/pkg/target/service/kind/cloud-config index 00030950a..386d05a2c 100644 --- a/pkg/target/service/kind/cloud-config +++ b/pkg/target/service/kind/cloud-config @@ -56,6 +56,7 @@ runcmd: - cmdKubeconfig="kind get kubeconfig --name kind-mapt > kubeconfig" - cmdCheckCluster="kubectl --request-timeout=3s --insecure-skip-tls-verify --kubeconfig kubeconfig get node >/dev/null 2>&1" - until eval $cmdCheckCluster; do eval $cmdKubeconfig; done + - sed -i 's#https://0.0.0.0:6443#https://127.0.0.1:6443#' /kubeconfig # Verify control-plane stability before exporting the kubeconfig. # The basic API check above only confirms the API server accepts a # single request. Control-plane pods may still restart during the @@ -68,7 +69,7 @@ runcmd: - | #!/bin/bash set -e - export KUBECONFIG=/root/kubeconfig + export KUBECONFIG=/kubeconfig MAX_WAIT=300 START=$SECONDS echo "Waiting for control-plane pods to reach Ready state..."