From ba6d254347b4c974815d59b517fde199cb0a4e95 Mon Sep 17 00:00:00 2001 From: Ryan Williams <3375653+ryankwilliams@users.noreply.github.com> Date: Tue, 1 Dec 2026 13:54:11 -0500 Subject: [PATCH] fix: incorrect kubeconfig file path set in cloud config This commit fixes a bug where aws kind clusters are failing waiting for the control plane pods to be ready (exceeds the 5 minute timeout). The issue is the kubeconfig file path is empty. Resulting in kubectl commands unable to locate the cluster. Updates the kubeconfig file path to the valid location where the kubeconfig file was initially written too. Signed-off-by: Ryan Williams <3375653+ryankwilliams@users.noreply.github.com> --- pkg/provider/ibmcloud/action/kind/cloud-config | 3 ++- pkg/target/service/kind/cloud-config | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) 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..."