Skip to content

Commit 871d6dd

Browse files
committed
stop printing usage help when the server commands exit
1 parent 46b2891 commit 871d6dd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cmd/kube-apiserver/app/server.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@ func NewAPIServerCommand() *cobra.Command {
104104
for the api objects which include pods, services, replicationcontrollers, and
105105
others. The API Server services REST operations and provides the frontend to the
106106
cluster's shared state through which all other components interact.`,
107+
108+
// stop printing usage when the command errors
109+
SilenceUsage: true,
107110
RunE: func(cmd *cobra.Command, args []string) error {
108111
verflag.PrintAndExitIfRequested()
109112
utilflag.PrintFlags(cmd.Flags())

0 commit comments

Comments
 (0)