Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
5090dcbc
Commit
5090dcbc
authored
Jan 14, 2015
by
Anthony Yeh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix example usage of kubectl resize command.
parent
4cd345b8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
kubectl.md
docs/kubectl.md
+4
-4
resize.go
pkg/kubectl/cmd/resize.go
+4
-4
No files found.
docs/kubectl.md
View file @
5090dcbc
...
...
@@ -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=<version>] [--current-replicas=<count>] --replicas=<count> <resource> <id> [flags]
kubectl resize [--resource-version=<version>] [--current-replicas=<count>] --replicas=<count> <resource> <id> [flags]
Available Flags:
--alsologtostderr=false: log to standard error as well as files
...
...
pkg/kubectl/cmd/resize.go
View file @
5090dcbc
...
...
@@ -26,7 +26,7 @@ import (
func
(
f
*
Factory
)
NewCmdResize
(
out
io
.
Writer
)
*
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)"
,
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"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment