diff --git a/test/e2e/e2e.go b/test/e2e/e2e.go index c743d04ee40..8a4f13e8ac3 100644 --- a/test/e2e/e2e.go +++ b/test/e2e/e2e.go @@ -62,7 +62,7 @@ func RegisterFlags() { // Randomize specs as well as suites config.GinkgoConfig.RandomizeAllSpecs = true - flag.StringVar(&testContext.KubeConfig, clientcmd.RecommendedConfigPathFlag, "", "Path to kubeconfig containing embedded authinfo.") + flag.StringVar(&testContext.KubeConfig, clientcmd.RecommendedConfigPathFlag, os.Getenv(clientcmd.RecommendedConfigPathEnvVar), "Path to kubeconfig containing embedded authinfo.") flag.StringVar(&testContext.KubeContext, clientcmd.FlagContext, "", "kubeconfig context to use/override. If unset, will use value from 'current-context'") flag.StringVar(&testContext.KubeVolumeDir, "volume-dir", "/var/lib/kubelet", "Path to the directory containing the kubelet volumes.") flag.StringVar(&testContext.CertDir, "cert-dir", "", "Path to the directory containing the certs. Default is empty, which doesn't use certs.")