mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 13:37:30 +00:00
Fix example usage of kubectl resize command.
This commit is contained in:
parent
4cd345b8a6
commit
5090dcbc62
@ -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.
|
guaranteed that the precondition holds true when the resize is sent to the server.
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
$ kubectl resize replicationcontrollers foo 3
|
$ kubectl resize --replicas=3 replicationcontrollers foo
|
||||||
resized
|
resized
|
||||||
|
|
||||||
# will only execute if the current size is 3
|
# will only execute if the current size is 2
|
||||||
$ kubectl resize --current-replicas=2 replicationcontrollers foo 3
|
$ kubectl resize --current-replicas=2 --replicas=3 replicationcontrollers foo
|
||||||
|
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
```
|
```
|
||||||
kubectl resize [---resource-version=<version>] [--current-replicas=<count>] --replicas=<count> <resource> <id> [flags]
|
kubectl resize [--resource-version=<version>] [--current-replicas=<count>] --replicas=<count> <resource> <id> [flags]
|
||||||
|
|
||||||
Available Flags:
|
Available Flags:
|
||||||
--alsologtostderr=false: log to standard error as well as files
|
--alsologtostderr=false: log to standard error as well as files
|
||||||
|
@ -26,7 +26,7 @@ import (
|
|||||||
|
|
||||||
func (f *Factory) NewCmdResize(out io.Writer) *cobra.Command {
|
func (f *Factory) NewCmdResize(out io.Writer) *cobra.Command {
|
||||||
cmd := &cobra.Command{
|
cmd := &cobra.Command{
|
||||||
Use: "resize [---resource-version=<version>] [--current-replicas=<count>] --replicas=<count> <resource> <id>",
|
Use: "resize [--resource-version=<version>] [--current-replicas=<count>] --replicas=<count> <resource> <id>",
|
||||||
Short: "Set a new size for a resizable resource (currently only Replication Controllers)",
|
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)
|
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.
|
guaranteed that the precondition holds true when the resize is sent to the server.
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
$ kubectl resize replicationcontrollers foo 3
|
$ kubectl resize --replicas=3 replicationcontrollers foo
|
||||||
resized
|
resized
|
||||||
|
|
||||||
# will only execute if the current size is 3
|
# will only execute if the current size is 2
|
||||||
$ kubectl resize --current-replicas=2 replicationcontrollers foo 3
|
$ kubectl resize --current-replicas=2 --replicas=3 replicationcontrollers foo
|
||||||
`,
|
`,
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
count := GetFlagInt(cmd, "replicas")
|
count := GetFlagInt(cmd, "replicas")
|
||||||
|
Loading…
Reference in New Issue
Block a user