diff --git a/contrib/mesos/cmd/km/kube-proxy.go b/contrib/mesos/cmd/km/kube-proxy.go index eebe1f6e5a983..9d3fa82fb0cfd 100644 --- a/contrib/mesos/cmd/km/kube-proxy.go +++ b/contrib/mesos/cmd/km/kube-proxy.go @@ -18,9 +18,6 @@ limitations under the License. package main import ( - "fmt" - "os" - kubeproxy "k8s.io/kubernetes/cmd/kube-proxy/app" "k8s.io/kubernetes/contrib/mesos/pkg/hyperkube" ) @@ -40,13 +37,13 @@ func NewKubeProxy() *Server { } config.AddFlags(hks.Flags()) - s, err := kubeproxy.NewProxyServerDefault(config) - if err != nil { - fmt.Fprintf(os.Stderr, "%v\n", err) - os.Exit(1) - } hks.Run = func(_ *Server, args []string) error { + s, err := kubeproxy.NewProxyServerDefault(config) + if err != nil { + return err + } + return s.Run(args) }