Using NAME to replace ID in help string

pull/6/head
feihujiang 2015-07-01 10:43:02 +08:00 committed by dinghaiyang
parent ceaddc0c44
commit 70036069ee
9 changed files with 34 additions and 34 deletions

View File

@ -48,7 +48,7 @@ kubectl
* [kubectl cluster-info](kubectl_cluster-info.md) - Display cluster info
* [kubectl config](kubectl_config.md) - config modifies kubeconfig files
* [kubectl create](kubectl_create.md) - Create a resource by filename or stdin
* [kubectl delete](kubectl_delete.md) - Delete a resource by filename, stdin, resource and ID, or by resources and label selector.
* [kubectl delete](kubectl_delete.md) - Delete a resource by filename, stdin, resource and name, or by resources and label selector.
* [kubectl describe](kubectl_describe.md) - Show details of a specific resource
* [kubectl exec](kubectl_exec.md) - Execute a command in a container.
* [kubectl expose](kubectl_expose.md) - Take a replicated application and expose it as Kubernetes Service
@ -63,9 +63,9 @@ kubectl
* [kubectl rolling-update](kubectl_rolling-update.md) - Perform a rolling update of the given ReplicationController.
* [kubectl run](kubectl_run.md) - Run a particular image on the cluster.
* [kubectl scale](kubectl_scale.md) - Set a new size for a Replication Controller.
* [kubectl stop](kubectl_stop.md) - Gracefully shut down a resource by id or filename.
* [kubectl stop](kubectl_stop.md) - Gracefully shut down a resource by name or filename.
* [kubectl version](kubectl_version.md) - Print the client and server version information.
###### Auto generated by spf13/cobra at 2015-06-29 23:26:32.294787115 +0000 UTC
###### Auto generated by spf13/cobra at 2015-07-01 07:34:21.247298407 +0000 UTC
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/kubectl.md?pixel)]()

View File

@ -1,11 +1,11 @@
## kubectl delete
Delete a resource by filename, stdin, resource and ID, or by resources and label selector.
Delete a resource by filename, stdin, resource and name, or by resources and label selector.
### Synopsis
Delete a resource by filename, stdin, resource and ID, or by resources and label selector.
Delete a resource by filename, stdin, resource and name, or by resources and label selector.
JSON and YAML formats are accepted.
@ -17,22 +17,22 @@ 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 [(NAME | -l label | --all)]
```
### Examples
```
// Delete a pod using the type and ID specified in pod.json.
// Delete a pod using the type and name specified in pod.json.
$ kubectl delete -f pod.json
// Delete a pod based on the type and ID in the JSON passed into stdin.
// Delete a pod based on the type and name in the JSON passed into stdin.
$ cat pod.json | kubectl delete -f -
// Delete pods and services with label name=myLabel.
$ kubectl delete pods,services -l name=myLabel
// Delete a pod with ID 1234-56-7890-234234-456456.
// Delete a pod with UID 1234-56-7890-234234-456456.
$ kubectl delete pod 1234-56-7890-234234-456456
// Delete all pods
@ -84,6 +84,6 @@ $ kubectl delete pods --all
### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-06-26 00:15:55.835198432 +0000 UTC
###### Auto generated by spf13/cobra at 2015-07-01 07:34:21.243108535 +0000 UTC
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/kubectl_delete.md?pixel)]()

View File

@ -13,7 +13,7 @@ scale is attempted, and it is guaranteed that the precondition holds true when t
scale is sent to the server.
```
kubectl scale [--resource-version=version] [--current-replicas=count] --replicas=COUNT RESOURCE ID
kubectl scale [--resource-version=version] [--current-replicas=count] --replicas=COUNT RESOURCE NAME
```
### Examples
@ -67,6 +67,6 @@ $ kubectl scale --current-replicas=2 --replicas=3 replicationcontrollers foo
### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-05-21 10:33:11.185268791 +0000 UTC
###### Auto generated by spf13/cobra at 2015-07-01 07:34:21.243720199 +0000 UTC
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/kubectl_scale.md?pixel)]()

View File

@ -1,17 +1,17 @@
## kubectl stop
Gracefully shut down a resource by id or filename.
Gracefully shut down a resource by name or filename.
### Synopsis
Gracefully shut down a resource by id or filename.
Gracefully shut down a resource by name or filename.
Attempts to shut down and delete a resource that supports graceful termination.
If the resource is scalable it will be scaled to 0 before deletion.
```
kubectl stop (-f FILENAME | RESOURCE (ID | -l label | --all))
kubectl stop (-f FILENAME | RESOURCE (NAME | -l label | --all))
```
### Examples
@ -74,6 +74,6 @@ $ kubectl stop -f path/to/resources
### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-05-29 23:14:50.709764383 +0000 UTC
###### Auto generated by spf13/cobra at 2015-07-01 07:34:21.245187967 +0000 UTC
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/kubectl_stop.md?pixel)]()

View File

@ -3,7 +3,7 @@
.SH NAME
.PP
kubectl delete \- Delete a resource by filename, stdin, resource and ID, or by resources and label selector.
kubectl delete \- Delete a resource by filename, stdin, resource and name, or by resources and label selector.
.SH SYNOPSIS
@ -13,7 +13,7 @@ kubectl delete \- Delete a resource by filename, stdin, resource and ID, or by r
.SH DESCRIPTION
.PP
Delete a resource by filename, stdin, resource and ID, or by resources and label selector.
Delete a resource by filename, stdin, resource and name, or by resources and label selector.
.PP
JSON and YAML formats are accepted.
@ -165,16 +165,16 @@ will be lost along with the rest of the resource.
.RS
.nf
// Delete a pod using the type and ID specified in pod.json.
// Delete a pod using the type and name specified in pod.json.
$ kubectl delete \-f pod.json
// Delete a pod based on the type and ID in the JSON passed into stdin.
// Delete a pod based on the type and name in the JSON passed into stdin.
$ cat pod.json | kubectl delete \-f \-
// Delete pods and services with label name=myLabel.
$ kubectl delete pods,services \-l name=myLabel
// Delete a pod with ID 1234\-56\-7890\-234234\-456456.
// Delete a pod with UID 1234\-56\-7890\-234234\-456456.
$ kubectl delete pod 1234\-56\-7890\-234234\-456456
// Delete all pods

View File

@ -3,7 +3,7 @@
.SH NAME
.PP
kubectl stop \- Gracefully shut down a resource by id or filename.
kubectl stop \- Gracefully shut down a resource by name or filename.
.SH SYNOPSIS
@ -13,7 +13,7 @@ kubectl stop \- Gracefully shut down a resource by id or filename.
.SH DESCRIPTION
.PP
Gracefully shut down a resource by id or filename.
Gracefully shut down a resource by name or filename.
.PP
Attempts to shut down and delete a resource that supports graceful termination.

View File

@ -32,7 +32,7 @@ import (
)
const (
delete_long = `Delete a resource by filename, stdin, resource and ID, or by resources and label selector.
delete_long = `Delete a resource by filename, stdin, resource and name, or by resources and label selector.
JSON and YAML formats are accepted.
@ -42,16 +42,16 @@ arguments are used and the filename is ignored.
Note that the delete command does NOT do resource version checks, so if someone
submits an update to a resource right when you submit a delete, their update
will be lost along with the rest of the resource.`
delete_example = `// Delete a pod using the type and ID specified in pod.json.
delete_example = `// Delete a pod using the type and name specified in pod.json.
$ kubectl delete -f pod.json
// Delete a pod based on the type and ID in the JSON passed into stdin.
// Delete a pod based on the type and name in the JSON passed into stdin.
$ cat pod.json | kubectl delete -f -
// Delete pods and services with label name=myLabel.
$ kubectl delete pods,services -l name=myLabel
// Delete a pod with ID 1234-56-7890-234234-456456.
// Delete a pod with UID 1234-56-7890-234234-456456.
$ kubectl delete pod 1234-56-7890-234234-456456
// Delete all pods
@ -61,8 +61,8 @@ $ kubectl delete pods --all`
func NewCmdDelete(f *cmdutil.Factory, out io.Writer) *cobra.Command {
var filenames util.StringList
cmd := &cobra.Command{
Use: "delete ([-f FILENAME] | (RESOURCE [(ID | -l label | --all)]",
Short: "Delete a resource by filename, stdin, resource and ID, or by resources and label selector.",
Use: "delete ([-f FILENAME] | (RESOURCE [(NAME | -l label | --all)]",
Short: "Delete a resource by filename, stdin, resource and name, or by resources and label selector.",
Long: delete_long,
Example: delete_example,
Run: func(cmd *cobra.Command, args []string) {

View File

@ -45,7 +45,7 @@ $ kubectl scale --current-replicas=2 --replicas=3 replicationcontrollers foo`
// NewCmdScale returns a cobra command with the appropriate configuration and flags to run scale
func NewCmdScale(f *cmdutil.Factory, out io.Writer) *cobra.Command {
cmd := &cobra.Command{
Use: "scale [--resource-version=version] [--current-replicas=count] --replicas=COUNT RESOURCE ID",
Use: "scale [--resource-version=version] [--current-replicas=count] --replicas=COUNT RESOURCE NAME",
// resize is deprecated
Aliases: []string{"resize"},
Short: "Set a new size for a Replication Controller.",
@ -71,7 +71,7 @@ func RunScale(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []stri
count := cmdutil.GetFlagInt(cmd, "replicas")
if count < 0 {
return cmdutil.UsageError(cmd, "--replicas=COUNT RESOURCE ID")
return cmdutil.UsageError(cmd, "--replicas=COUNT RESOURCE NAME")
}
cmdNamespace, err := f.DefaultNamespace()

View File

@ -27,7 +27,7 @@ import (
)
const (
stop_long = `Gracefully shut down a resource by id or filename.
stop_long = `Gracefully shut down a resource by name or filename.
Attempts to shut down and delete a resource that supports graceful termination.
If the resource is scalable it will be scaled to 0 before deletion.`
@ -49,8 +49,8 @@ func NewCmdStop(f *cmdutil.Factory, out io.Writer) *cobra.Command {
Filenames util.StringList
}{}
cmd := &cobra.Command{
Use: "stop (-f FILENAME | RESOURCE (ID | -l label | --all))",
Short: "Gracefully shut down a resource by id or filename.",
Use: "stop (-f FILENAME | RESOURCE (NAME | -l label | --all))",
Short: "Gracefully shut down a resource by name or filename.",
Long: stop_long,
Example: stop_example,
Run: func(cmd *cobra.Command, args []string) {