diff --git a/docs/kubectl.md b/docs/kubectl.md index dc46cc98984..fb3978e6a2b 100644 --- a/docs/kubectl.md +++ b/docs/kubectl.md @@ -826,16 +826,16 @@ If a precondition is specified, it is validated before the resize is attempted, guaranteed that the precondition holds true when the resize is sent to the server. Examples: - $ kubectl resize replicationcontrollers foo 3 + $ kubectl resize --replicas=3 replicationcontrollers foo resized - # will only execute if the current size is 3 - $ kubectl resize --current-replicas=2 replicationcontrollers foo 3 + # will only execute if the current size is 2 + $ kubectl resize --current-replicas=2 --replicas=3 replicationcontrollers foo Usage: ``` - kubectl resize [---resource-version=] [--current-replicas=] --replicas= [flags] + kubectl resize [--resource-version=] [--current-replicas=] --replicas= [flags] Available Flags: --alsologtostderr=false: log to standard error as well as files diff --git a/pkg/kubectl/cmd/resize.go b/pkg/kubectl/cmd/resize.go index c68a6179352..5b2980f4e20 100644 --- a/pkg/kubectl/cmd/resize.go +++ b/pkg/kubectl/cmd/resize.go @@ -26,7 +26,7 @@ import ( func (f *Factory) NewCmdResize(out io.Writer) *cobra.Command { cmd := &cobra.Command{ - Use: "resize [---resource-version=] [--current-replicas=] --replicas= ", + Use: "resize [--resource-version=] [--current-replicas=] --replicas= ", Short: "Set a new size for a resizable resource (currently only Replication Controllers)", Long: `Set a new size for a resizable resource (currently only Replication Controllers) @@ -37,11 +37,11 @@ If a precondition is specified, it is validated before the resize is attempted, guaranteed that the precondition holds true when the resize is sent to the server. Examples: - $ kubectl resize replicationcontrollers foo 3 + $ kubectl resize --replicas=3 replicationcontrollers foo resized - # will only execute if the current size is 3 - $ kubectl resize --current-replicas=2 replicationcontrollers foo 3 + # will only execute if the current size is 2 + $ kubectl resize --current-replicas=2 --replicas=3 replicationcontrollers foo `, Run: func(cmd *cobra.Command, args []string) { count := GetFlagInt(cmd, "replicas")