diff --git a/test/e2e/util.go b/test/e2e/util.go index 60f60443826..c41be09d532 100644 --- a/test/e2e/util.go +++ b/test/e2e/util.go @@ -34,6 +34,7 @@ import ( "github.com/GoogleCloudPlatform/kubernetes/pkg/api" "github.com/GoogleCloudPlatform/kubernetes/pkg/client" "github.com/GoogleCloudPlatform/kubernetes/pkg/client/clientcmd" + clientcmdapi "github.com/GoogleCloudPlatform/kubernetes/pkg/client/clientcmd/api" "github.com/GoogleCloudPlatform/kubernetes/pkg/cloudprovider" "github.com/GoogleCloudPlatform/kubernetes/pkg/fields" "github.com/GoogleCloudPlatform/kubernetes/pkg/kubectl" @@ -275,7 +276,7 @@ func loadConfig() (*client.Config, error) { fmt.Printf(">>> testContext.KubeContext: %s\n", testContext.KubeContext) c.CurrentContext = testContext.KubeContext } - return clientcmd.NewDefaultClientConfig(*c, &clientcmd.ConfigOverrides{}).ClientConfig() + return clientcmd.NewDefaultClientConfig(*c, &clientcmd.ConfigOverrides{ClusterInfo: clientcmdapi.Cluster{Server: testContext.Host}}).ClientConfig() default: return nil, fmt.Errorf("KubeConfig must be specified to load client config") }