Added support for labels to "kubectl stop".

Added support for labels and --all to "kubectl stop". Fixes #5178.
This commit is contained in:
Jerzy Szczepkowski
2015-03-10 13:21:49 +01:00
parent 6d465c4d86
commit 110ab79f05
5 changed files with 27 additions and 4 deletions

View File

@@ -17,7 +17,7 @@ submits an update to a resource right when you submit a delete, their update
will be lost along with the rest of the resource.
```
kubectl delete ([-f filename] | (<resource> [(<id> | -l <label> | --all)]
kubectl delete (-f filename | <resource> (<id> | -l <label> | --all))
### Examples

View File

@@ -11,7 +11,7 @@ Attempts to shut down and delete a resource that supports graceful termination.
If the resource is resizable it will be resized to 0 before deletion.
```
kubectl stop (<resource> <id>|-f filename)
kubectl stop (-f filename | <resource> (<id> | -l <label> | --all))
### Examples
@@ -19,6 +19,9 @@ kubectl stop (<resource> <id>|-f filename)
// Shut down foo.
$ kubectl stop replicationcontroller foo
// Stop pods and services with label name=myLabel.
$ kubectl stop pods,services -l name=myLabel
// Shut down the service defined in service.json
$ kubectl stop -f service.json
@@ -29,7 +32,9 @@ $ kubectl stop -f path/to/resources
### Options
```
--all=false: [-all] to select all the specified resources
-f, --filename=[]: Filename, directory, or URL to file of resource(s) to be stopped
-l, --selector="": Selector (label query) to filter on
```
### Options inherrited from parent commands

View File

@@ -21,10 +21,18 @@ If the resource is resizable it will be resized to 0 before deletion.
.SH OPTIONS
.PP
\fB\-\-all\fP=false
[\-all] to select all the specified resources
.PP
\fB\-f\fP, \fB\-\-filename\fP=[]
Filename, directory, or URL to file of resource(s) to be stopped
.PP
\fB\-l\fP, \fB\-\-selector\fP=""
Selector (label query) to filter on
.SH OPTIONS INHERITED FROM PARENT COMMANDS
.PP
@@ -140,6 +148,9 @@ If the resource is resizable it will be resized to 0 before deletion.
// Shut down foo.
$ kubectl stop replicationcontroller foo
// Stop pods and services with label name=myLabel.
$ kubectl stop pods,services \-l name=myLabel
// Shut down the service defined in service.json
$ kubectl stop \-f service.json