diff --git a/cmd/k8s-operator/proxy.go b/cmd/k8s-operator/proxy.go index ec1027e09..74cda258f 100644 --- a/cmd/k8s-operator/proxy.go +++ b/cmd/k8s-operator/proxy.go @@ -91,6 +91,9 @@ func maybeLaunchAPIServerProxy(zlog *zap.SugaredLogger, restConfig *rest.Config, } hostinfo.SetApp("k8s-operator-proxy") startlog := zlog.Named("launchAPIProxy") + if mode == apiserverProxyModeNoAuth { + restConfig = rest.AnonymousClientConfig(restConfig) + } cfg, err := restConfig.TransportConfig() if err != nil { startlog.Fatalf("could not get rest.TransportConfig(): %v", err)