From c38ceb59de7f5085948395c6e8c87b5eecdd02ca Mon Sep 17 00:00:00 2001 From: Rihab Banday Date: Fri, 22 Oct 2021 12:26:12 +0200 Subject: Replace localhost with K8s Master IP in kubeconfig This change is needed to fix the issue observed in failing testcases as discussed on Slack. Signed-off-by: Rihab Banday Change-Id: I8dff51883031aeed3c770b085d7c3c546942a352 Reviewed-on: https://gerrit.opnfv.org/gerrit/c/kuberef/+/72983 Tested-by: jenkins-ci Reviewed-by: Michael Pedersen --- functions.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/functions.sh b/functions.sh index 89c1ebb..67edf7d 100755 --- a/functions.sh +++ b/functions.sh @@ -310,6 +310,7 @@ copy_k8s_config() { # shellcheck disable=SC2087 ssh -o StrictHostKeyChecking=no -tT "$USERNAME"@"$(get_vm_ip)" << EOF scp -o StrictHostKeyChecking=no -q root@"$MASTER_IP":/root/.kube/config "${PROJECT_ROOT}"/kubeconfig +sed -i 's/127.0.0.1/$MASTER_IP/g' "${PROJECT_ROOT}"/kubeconfig EOF # Copy kubeconfig from Jump VM to appropriate location in Jump Host -- cgit 1.2.3-korg