diff --git a/test/e2e/kubectl.go b/test/e2e/kubectl.go index bb5ac080a42..6b5154f5f0e 100644 --- a/test/e2e/kubectl.go +++ b/test/e2e/kubectl.go @@ -566,15 +566,8 @@ var _ = framework.KubeDescribe("Kubectl client", func() { framework.SkipUnlessProviderIs("gke") nsFlag := fmt.Sprintf("--namespace=%v", ns) podJson := readTestFileOrDie(kubectlInPodFilename) - - // Replace the host path to kubectl in json - podString := strings.Replace(string(podJson), - "$KUBECTL_PATH", - framework.TestContext.KubectlPath, - 1) - By("validating api verions") - framework.RunKubectlOrDieInput(podString, "create", "-f", "-", nsFlag) + framework.RunKubectlOrDieInput(string(podJson), "create", "-f", "-", nsFlag) err := wait.PollImmediate(time.Second, time.Minute, func() (bool, error) { output := framework.RunKubectlOrDie("get", "pods/kubectl-in-pod", nsFlag) if strings.Contains(output, "Running") { diff --git a/test/e2e/testing-manifests/kubectl/kubectl-in-pod.json b/test/e2e/testing-manifests/kubectl/kubectl-in-pod.json index c09777e0a05..e4c4d76cd7e 100644 --- a/test/e2e/testing-manifests/kubectl/kubectl-in-pod.json +++ b/test/e2e/testing-manifests/kubectl/kubectl-in-pod.json @@ -20,7 +20,7 @@ ], "volumes": [{ "name":"kubectl", - "hostPath":{"path": "$KUBECTL_PATH"} + "hostPath":{"path": "/usr/bin/kubectl"} }] } }