From 871d6dd8bb306e3a91cd1f6abacd04f06454f14b Mon Sep 17 00:00:00 2001 From: David Eads Date: Mon, 20 Apr 2020 08:29:52 -0400 Subject: [PATCH] stop printing usage help when the server commands exit --- cmd/kube-apiserver/app/server.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/kube-apiserver/app/server.go b/cmd/kube-apiserver/app/server.go index 2ad5309f22d..458da8559b5 100644 --- a/cmd/kube-apiserver/app/server.go +++ b/cmd/kube-apiserver/app/server.go @@ -104,6 +104,9 @@ func NewAPIServerCommand() *cobra.Command { for the api objects which include pods, services, replicationcontrollers, and others. The API Server services REST operations and provides the frontend to the cluster's shared state through which all other components interact.`, + + // stop printing usage when the command errors + SilenceUsage: true, RunE: func(cmd *cobra.Command, args []string) error { verflag.PrintAndExitIfRequested() utilflag.PrintFlags(cmd.Flags())