diff --git a/test/e2e/framework/pod/exec_util.go b/test/e2e/framework/pod/exec_util.go index 062e037ae95..7f6e6064e02 100644 --- a/test/e2e/framework/pod/exec_util.go +++ b/test/e2e/framework/pod/exec_util.go @@ -58,8 +58,6 @@ func ExecWithOptionsContext(ctx context.Context, f *framework.Framework, options if !options.Quiet { framework.Logf("ExecWithOptions %+v", options) } - config, err := framework.LoadConfig() - framework.ExpectNoError(err, "failed to load restclient config") const tty = false @@ -80,7 +78,7 @@ func ExecWithOptionsContext(ctx context.Context, f *framework.Framework, options var stdout, stderr bytes.Buffer framework.Logf("ExecWithOptions: execute(POST %s)", req.URL()) - err = execute(ctx, "POST", req.URL(), config, options.Stdin, &stdout, &stderr, tty) + err := execute(ctx, "POST", req.URL(), f.ClientConfig(), options.Stdin, &stdout, &stderr, tty) if options.PreserveWhitespace { return stdout.String(), stderr.String(), err