mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 05:27:21 +00:00
Use TYPE instead of RESOURCE in help string
For commands in kubectl, use TYPE in help string.
This commit is contained in:
parent
159ba48932
commit
33fb6170f9
@ -20,10 +20,10 @@ This command joins many API calls together to form a detailed description of a
|
|||||||
given resource or group of resources.
|
given resource or group of resources.
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
$ kubectl describe RESOURCE NAME\_PREFIX
|
$ kubectl describe TYPE NAME\_PREFIX
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
will first check for an exact match on RESOURCE and NAME\_PREFIX. If no such resource
|
will first check for an exact match on TYPE and NAME\_PREFIX. If no such resource
|
||||||
exists, it will output details for every resource that has a name prefixed with NAME\_PREFIX
|
exists, it will output details for every resource that has a name prefixed with NAME\_PREFIX
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
|
@ -16,7 +16,7 @@ kubectl get \- Display one or many resources
|
|||||||
Display one or many resources.
|
Display one or many resources.
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
Possible resources include (case insensitive): pods (po), services (svc),
|
Possible resource types include (case insensitive): pods (po), services (svc),
|
||||||
replicationcontrollers (rc), nodes (no), events (ev), componentstatuses (cs),
|
replicationcontrollers (rc), nodes (no), events (ev), componentstatuses (cs),
|
||||||
limitranges (limits), persistentvolumes (pv), persistentvolumeclaims (pvc),
|
limitranges (limits), persistentvolumes (pv), persistentvolumeclaims (pvc),
|
||||||
resourcequotas (quota), namespaces (ns), endpoints (ep) or secrets.
|
resourcequotas (quota), namespaces (ns), endpoints (ep) or secrets.
|
||||||
|
@ -16,7 +16,7 @@ kubectl stop \- Deprecated: Gracefully shut down a resource by name or filename.
|
|||||||
Deprecated: Gracefully shut down a resource by name or filename.
|
Deprecated: Gracefully shut down a resource by name or filename.
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
stop command is deprecated, all its functionalities are covered by delete command.
|
The stop command is deprecated, all its functionalities are covered by delete command.
|
||||||
See 'kubectl delete \-\-help' for more details.
|
See 'kubectl delete \-\-help' for more details.
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
|
@ -102,7 +102,7 @@ kubectl
|
|||||||
* [kubectl stop](kubectl_stop.md) - Deprecated: Gracefully shut down a resource by name or filename.
|
* [kubectl stop](kubectl_stop.md) - Deprecated: Gracefully shut down a resource by name or filename.
|
||||||
* [kubectl version](kubectl_version.md) - Print the client and server version information.
|
* [kubectl version](kubectl_version.md) - Print the client and server version information.
|
||||||
|
|
||||||
###### Auto generated by spf13/cobra at 2015-08-03 05:57:27.777459508 +0000 UTC
|
###### Auto generated by spf13/cobra at 2015-08-05 08:34:34.582015569 +0000 UTC
|
||||||
|
|
||||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||||
[]()
|
[]()
|
||||||
|
@ -83,7 +83,7 @@ kubectl api-versions
|
|||||||
|
|
||||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||||
|
|
||||||
###### Auto generated by spf13/cobra at 2015-07-14 00:11:42.959722426 +0000 UTC
|
###### Auto generated by spf13/cobra at 2015-07-29 09:00:08.946374303 +0000 UTC
|
||||||
|
|
||||||
|
|
||||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||||
|
@ -49,7 +49,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.
|
will be lost along with the rest of the resource.
|
||||||
|
|
||||||
```
|
```
|
||||||
kubectl delete ([-f FILENAME] | (RESOURCE [(NAME | -l label | --all)]
|
kubectl delete ([-f FILENAME] | TYPE [(NAME | -l label | --all)])
|
||||||
```
|
```
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
@ -118,8 +118,7 @@ $ kubectl delete pods --all
|
|||||||
|
|
||||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||||
|
|
||||||
###### Auto generated by spf13/cobra at 2015-07-31 02:09:06.816515226 +0000 UTC
|
###### Auto generated by spf13/cobra at 2015-08-05 08:34:34.576732162 +0000 UTC
|
||||||
|
|
||||||
|
|
||||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||||
[]()
|
[]()
|
||||||
|
@ -43,9 +43,9 @@ Show details of a specific resource or group of resources.
|
|||||||
This command joins many API calls together to form a detailed description of a
|
This command joins many API calls together to form a detailed description of a
|
||||||
given resource or group of resources.
|
given resource or group of resources.
|
||||||
|
|
||||||
$ kubectl describe RESOURCE NAME_PREFIX
|
$ kubectl describe TYPE NAME_PREFIX
|
||||||
|
|
||||||
will first check for an exact match on RESOURCE and NAME_PREFIX. If no such resource
|
will first check for an exact match on TYPE and NAME_PREFIX. If no such resource
|
||||||
exists, it will output details for every resource that has a name prefixed with NAME_PREFIX
|
exists, it will output details for every resource that has a name prefixed with NAME_PREFIX
|
||||||
|
|
||||||
Possible resources include (case insensitive): pods (po), services (svc),
|
Possible resources include (case insensitive): pods (po), services (svc),
|
||||||
@ -54,7 +54,7 @@ persistentvolumes (pv), persistentvolumeclaims (pvc), resourcequotas (quota),
|
|||||||
namespaces (ns) or secrets.
|
namespaces (ns) or secrets.
|
||||||
|
|
||||||
```
|
```
|
||||||
kubectl describe (RESOURCE NAME_PREFIX | RESOURCE/NAME)
|
kubectl describe (TYPE [(NAME_PREFIX | -l label] | TYPE/NAME)
|
||||||
```
|
```
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
@ -114,8 +114,7 @@ $ kubectl describe pods frontend
|
|||||||
|
|
||||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||||
|
|
||||||
###### Auto generated by spf13/cobra at 2015-07-31 07:12:36.111698336 +0000 UTC
|
###### Auto generated by spf13/cobra at 2015-08-05 08:29:19.076341666 +0000 UTC
|
||||||
|
|
||||||
|
|
||||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||||
[]()
|
[]()
|
||||||
|
@ -45,7 +45,7 @@ selector for a new Service on the specified port. If no labels are specified, th
|
|||||||
re-use the labels from the resource it exposes.
|
re-use the labels from the resource it exposes.
|
||||||
|
|
||||||
```
|
```
|
||||||
kubectl expose RESOURCE NAME --port=port [--protocol=TCP|UDP] [--target-port=number-or-name] [--name=name] [--public-ip=ip] [--type=type]
|
kubectl expose TYPE NAME --port=port [--protocol=TCP|UDP] [--target-port=number-or-name] [--name=name] [--public-ip=ip] [--type=type]
|
||||||
```
|
```
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
@ -118,8 +118,7 @@ $ kubectl expose rc streamer --port=4100 --protocol=udp --name=video-stream
|
|||||||
|
|
||||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||||
|
|
||||||
###### Auto generated by spf13/cobra at 2015-07-31 17:33:19.568673976 +0000 UTC
|
###### Auto generated by spf13/cobra at 2015-08-05 08:29:19.08042907 +0000 UTC
|
||||||
|
|
||||||
|
|
||||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||||
[]()
|
[]()
|
||||||
|
@ -40,7 +40,7 @@ Display one or many resources
|
|||||||
|
|
||||||
Display one or many resources.
|
Display one or many resources.
|
||||||
|
|
||||||
Possible resources include (case insensitive): pods (po), services (svc),
|
Possible resource types include (case insensitive): pods (po), services (svc),
|
||||||
replicationcontrollers (rc), nodes (no), events (ev), componentstatuses (cs),
|
replicationcontrollers (rc), nodes (no), events (ev), componentstatuses (cs),
|
||||||
limitranges (limits), persistentvolumes (pv), persistentvolumeclaims (pvc),
|
limitranges (limits), persistentvolumes (pv), persistentvolumeclaims (pvc),
|
||||||
resourcequotas (quota), namespaces (ns), endpoints (ep) or secrets.
|
resourcequotas (quota), namespaces (ns), endpoints (ep) or secrets.
|
||||||
@ -49,7 +49,7 @@ By specifying the output as 'template' and providing a Go template as the value
|
|||||||
of the --template flag, you can filter the attributes of the fetched resource(s).
|
of the --template flag, you can filter the attributes of the fetched resource(s).
|
||||||
|
|
||||||
```
|
```
|
||||||
kubectl get [(-o|--output=)json|yaml|template|wide|...] (RESOURCE [NAME] | RESOURCE/NAME ...)
|
kubectl get [(-o|--output=)json|yaml|template|wide|...] (TYPE [(NAME | -l label] | TYPE/NAME ...)
|
||||||
```
|
```
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
@ -125,8 +125,7 @@ $ kubectl get rc/web service/frontend pods/web-pod-13je7
|
|||||||
|
|
||||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||||
|
|
||||||
###### Auto generated by spf13/cobra at 2015-07-30 08:43:29.371131796 +0000 UTC
|
###### Auto generated by spf13/cobra at 2015-08-05 08:29:19.076072367 +0000 UTC
|
||||||
|
|
||||||
|
|
||||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||||
[]()
|
[]()
|
||||||
|
@ -45,7 +45,7 @@ If --overwrite is true, then existing labels can be overwritten, otherwise attem
|
|||||||
If --resource-version is specified, then updates will use this resource version, otherwise the existing resource-version will be used.
|
If --resource-version is specified, then updates will use this resource version, otherwise the existing resource-version will be used.
|
||||||
|
|
||||||
```
|
```
|
||||||
kubectl label [--overwrite] RESOURCE NAME KEY_1=VAL_1 ... KEY_N=VAL_N [--resource-version=version]
|
kubectl label [--overwrite] TYPE NAME KEY_1=VAL_1 ... KEY_N=VAL_N [--resource-version=version]
|
||||||
```
|
```
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
@ -115,7 +115,7 @@ $ kubectl label pods foo bar-
|
|||||||
|
|
||||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||||
|
|
||||||
###### Auto generated by spf13/cobra at 2015-07-14 00:11:42.958329854 +0000 UTC
|
###### Auto generated by spf13/cobra at 2015-07-30 07:40:18.746222333 +0000 UTC
|
||||||
|
|
||||||
|
|
||||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||||
|
@ -45,7 +45,7 @@ JSON and YAML formats are accepted.
|
|||||||
Please refer to the models in https://htmlpreview.github.io/?https://github.com/GoogleCloudPlatform/kubernetes/HEAD/docs/api-reference/definitions.html to find if a field is mutable.
|
Please refer to the models in https://htmlpreview.github.io/?https://github.com/GoogleCloudPlatform/kubernetes/HEAD/docs/api-reference/definitions.html to find if a field is mutable.
|
||||||
|
|
||||||
```
|
```
|
||||||
kubectl patch RESOURCE NAME -p PATCH
|
kubectl patch TYPE NAME -p PATCH
|
||||||
```
|
```
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
@ -100,8 +100,7 @@ kubectl patch pod valid-pod -p '{"spec":{"containers":[{"name":"kubernetes-serve
|
|||||||
|
|
||||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||||
|
|
||||||
###### Auto generated by spf13/cobra at 2015-08-01 00:12:16.314479678 +0000 UTC
|
###### Auto generated by spf13/cobra at 2015-08-05 08:29:19.076903307 +0000 UTC
|
||||||
|
|
||||||
|
|
||||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||||
[]()
|
[]()
|
||||||
|
@ -46,7 +46,7 @@ scale is attempted, and it is guaranteed that the precondition holds true when t
|
|||||||
scale is sent to the server.
|
scale is sent to the server.
|
||||||
|
|
||||||
```
|
```
|
||||||
kubectl scale [--resource-version=version] [--current-replicas=count] --replicas=COUNT RESOURCE NAME
|
kubectl scale [--resource-version=version] [--current-replicas=count] --replicas=COUNT TYPE NAME
|
||||||
```
|
```
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
@ -106,8 +106,7 @@ $ kubectl scale --replicas=5 rc/foo rc/bar
|
|||||||
|
|
||||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||||
|
|
||||||
###### Auto generated by spf13/cobra at 2015-07-30 08:50:55.94117889 +0000 UTC
|
###### Auto generated by spf13/cobra at 2015-08-05 08:29:19.077655801 +0000 UTC
|
||||||
|
|
||||||
|
|
||||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||||
[]()
|
[]()
|
||||||
|
@ -40,14 +40,14 @@ Deprecated: Gracefully shut down a resource by name or filename.
|
|||||||
|
|
||||||
Deprecated: Gracefully shut down a resource by name or filename.
|
Deprecated: Gracefully shut down a resource by name or filename.
|
||||||
|
|
||||||
stop command is deprecated, all its functionalities are covered by delete command.
|
The stop command is deprecated, all its functionalities are covered by delete command.
|
||||||
See 'kubectl delete --help' for more details.
|
See 'kubectl delete --help' for more details.
|
||||||
|
|
||||||
Attempts to shut down and delete a resource that supports graceful termination.
|
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.
|
If the resource is scalable it will be scaled to 0 before deletion.
|
||||||
|
|
||||||
```
|
```
|
||||||
kubectl stop (-f FILENAME | RESOURCE (NAME | -l label | --all))
|
kubectl stop (-f FILENAME | TYPE (NAME | -l label | --all))
|
||||||
```
|
```
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
@ -112,7 +112,7 @@ $ kubectl stop -f path/to/resources
|
|||||||
|
|
||||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||||
|
|
||||||
###### Auto generated by spf13/cobra at 2015-07-29 09:18:59.539597953 +0000 UTC
|
###### Auto generated by spf13/cobra at 2015-07-30 07:40:18.745881487 +0000 UTC
|
||||||
|
|
||||||
|
|
||||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||||
|
@ -61,7 +61,7 @@ $ kubectl delete pods --all`
|
|||||||
func NewCmdDelete(f *cmdutil.Factory, out io.Writer) *cobra.Command {
|
func NewCmdDelete(f *cmdutil.Factory, out io.Writer) *cobra.Command {
|
||||||
var filenames util.StringList
|
var filenames util.StringList
|
||||||
cmd := &cobra.Command{
|
cmd := &cobra.Command{
|
||||||
Use: "delete ([-f FILENAME] | (RESOURCE [(NAME | -l label | --all)]",
|
Use: "delete ([-f FILENAME] | TYPE [(NAME | -l label | --all)])",
|
||||||
Short: "Delete resources by filenames, stdin, resources and names, or by resources and label selector.",
|
Short: "Delete resources by filenames, stdin, resources and names, or by resources and label selector.",
|
||||||
Long: delete_long,
|
Long: delete_long,
|
||||||
Example: delete_example,
|
Example: delete_example,
|
||||||
|
@ -37,9 +37,9 @@ const (
|
|||||||
This command joins many API calls together to form a detailed description of a
|
This command joins many API calls together to form a detailed description of a
|
||||||
given resource or group of resources.
|
given resource or group of resources.
|
||||||
|
|
||||||
$ kubectl describe RESOURCE NAME_PREFIX
|
$ kubectl describe TYPE NAME_PREFIX
|
||||||
|
|
||||||
will first check for an exact match on RESOURCE and NAME_PREFIX. If no such resource
|
will first check for an exact match on TYPE and NAME_PREFIX. If no such resource
|
||||||
exists, it will output details for every resource that has a name prefixed with NAME_PREFIX
|
exists, it will output details for every resource that has a name prefixed with NAME_PREFIX
|
||||||
|
|
||||||
Possible resources include (case insensitive): pods (po), services (svc),
|
Possible resources include (case insensitive): pods (po), services (svc),
|
||||||
@ -62,7 +62,7 @@ $ kubectl describe pods frontend`
|
|||||||
|
|
||||||
func NewCmdDescribe(f *cmdutil.Factory, out io.Writer) *cobra.Command {
|
func NewCmdDescribe(f *cmdutil.Factory, out io.Writer) *cobra.Command {
|
||||||
cmd := &cobra.Command{
|
cmd := &cobra.Command{
|
||||||
Use: "describe (RESOURCE NAME_PREFIX | RESOURCE/NAME)",
|
Use: "describe (TYPE [(NAME_PREFIX | -l label] | TYPE/NAME)",
|
||||||
Short: "Show details of a specific resource or group of resources",
|
Short: "Show details of a specific resource or group of resources",
|
||||||
Long: describe_long,
|
Long: describe_long,
|
||||||
Example: describe_example,
|
Example: describe_example,
|
||||||
|
@ -46,7 +46,7 @@ $ kubectl expose rc streamer --port=4100 --protocol=udp --name=video-stream`
|
|||||||
|
|
||||||
func NewCmdExposeService(f *cmdutil.Factory, out io.Writer) *cobra.Command {
|
func NewCmdExposeService(f *cmdutil.Factory, out io.Writer) *cobra.Command {
|
||||||
cmd := &cobra.Command{
|
cmd := &cobra.Command{
|
||||||
Use: "expose RESOURCE NAME --port=port [--protocol=TCP|UDP] [--target-port=number-or-name] [--name=name] [--public-ip=ip] [--type=type]",
|
Use: "expose TYPE NAME --port=port [--protocol=TCP|UDP] [--target-port=number-or-name] [--name=name] [--public-ip=ip] [--type=type]",
|
||||||
Short: "Take a replicated application and expose it as Kubernetes Service",
|
Short: "Take a replicated application and expose it as Kubernetes Service",
|
||||||
Long: expose_long,
|
Long: expose_long,
|
||||||
Example: expose_example,
|
Example: expose_example,
|
||||||
|
@ -32,7 +32,7 @@ import (
|
|||||||
const (
|
const (
|
||||||
get_long = `Display one or many resources.
|
get_long = `Display one or many resources.
|
||||||
|
|
||||||
Possible resources include (case insensitive): pods (po), services (svc),
|
Possible resource types include (case insensitive): pods (po), services (svc),
|
||||||
replicationcontrollers (rc), nodes (no), events (ev), componentstatuses (cs),
|
replicationcontrollers (rc), nodes (no), events (ev), componentstatuses (cs),
|
||||||
limitranges (limits), persistentvolumes (pv), persistentvolumeclaims (pvc),
|
limitranges (limits), persistentvolumes (pv), persistentvolumeclaims (pvc),
|
||||||
resourcequotas (quota), namespaces (ns), endpoints (ep) or secrets.
|
resourcequotas (quota), namespaces (ns), endpoints (ep) or secrets.
|
||||||
@ -68,7 +68,7 @@ func NewCmdGet(f *cmdutil.Factory, out io.Writer) *cobra.Command {
|
|||||||
validArgs := p.HandledResources()
|
validArgs := p.HandledResources()
|
||||||
|
|
||||||
cmd := &cobra.Command{
|
cmd := &cobra.Command{
|
||||||
Use: "get [(-o|--output=)json|yaml|template|wide|...] (RESOURCE [NAME] | RESOURCE/NAME ...)",
|
Use: "get [(-o|--output=)json|yaml|template|wide|...] (TYPE [(NAME | -l label] | TYPE/NAME ...)",
|
||||||
Short: "Display one or many resources",
|
Short: "Display one or many resources",
|
||||||
Long: get_long,
|
Long: get_long,
|
||||||
Example: get_example,
|
Example: get_example,
|
||||||
|
@ -54,7 +54,7 @@ $ kubectl label pods foo bar-`
|
|||||||
|
|
||||||
func NewCmdLabel(f *cmdutil.Factory, out io.Writer) *cobra.Command {
|
func NewCmdLabel(f *cmdutil.Factory, out io.Writer) *cobra.Command {
|
||||||
cmd := &cobra.Command{
|
cmd := &cobra.Command{
|
||||||
Use: "label [--overwrite] RESOURCE NAME KEY_1=VAL_1 ... KEY_N=VAL_N [--resource-version=version]",
|
Use: "label [--overwrite] TYPE NAME KEY_1=VAL_1 ... KEY_N=VAL_N [--resource-version=version]",
|
||||||
Short: "Update the labels on a resource",
|
Short: "Update the labels on a resource",
|
||||||
Long: fmt.Sprintf(label_long, util.LabelValueMaxLength),
|
Long: fmt.Sprintf(label_long, util.LabelValueMaxLength),
|
||||||
Example: label_example,
|
Example: label_example,
|
||||||
|
@ -42,7 +42,7 @@ kubectl patch pod valid-pod -p '{"spec":{"containers":[{"name":"kubernetes-serve
|
|||||||
|
|
||||||
func NewCmdPatch(f *cmdutil.Factory, out io.Writer) *cobra.Command {
|
func NewCmdPatch(f *cmdutil.Factory, out io.Writer) *cobra.Command {
|
||||||
cmd := &cobra.Command{
|
cmd := &cobra.Command{
|
||||||
Use: "patch RESOURCE NAME -p PATCH",
|
Use: "patch TYPE NAME -p PATCH",
|
||||||
Short: "Update field(s) of a resource by stdin.",
|
Short: "Update field(s) of a resource by stdin.",
|
||||||
Long: patch_long,
|
Long: patch_long,
|
||||||
Example: patch_example,
|
Example: patch_example,
|
||||||
|
@ -49,7 +49,7 @@ $ kubectl scale --replicas=5 rc/foo rc/bar`
|
|||||||
// NewCmdScale returns a cobra command with the appropriate configuration and flags to run scale
|
// NewCmdScale returns a cobra command with the appropriate configuration and flags to run scale
|
||||||
func NewCmdScale(f *cmdutil.Factory, out io.Writer) *cobra.Command {
|
func NewCmdScale(f *cmdutil.Factory, out io.Writer) *cobra.Command {
|
||||||
cmd := &cobra.Command{
|
cmd := &cobra.Command{
|
||||||
Use: "scale [--resource-version=version] [--current-replicas=count] --replicas=COUNT RESOURCE NAME",
|
Use: "scale [--resource-version=version] [--current-replicas=count] --replicas=COUNT TYPE NAME",
|
||||||
// resize is deprecated
|
// resize is deprecated
|
||||||
Aliases: []string{"resize"},
|
Aliases: []string{"resize"},
|
||||||
Short: "Set a new size for a Replication Controller.",
|
Short: "Set a new size for a Replication Controller.",
|
||||||
@ -79,7 +79,7 @@ func RunScale(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []stri
|
|||||||
|
|
||||||
count := cmdutil.GetFlagInt(cmd, "replicas")
|
count := cmdutil.GetFlagInt(cmd, "replicas")
|
||||||
if count < 0 {
|
if count < 0 {
|
||||||
return cmdutil.UsageError(cmd, "--replicas=COUNT RESOURCE NAME")
|
return cmdutil.UsageError(cmd, "--replicas=COUNT TYPE NAME")
|
||||||
}
|
}
|
||||||
|
|
||||||
cmdNamespace, _, err := f.DefaultNamespace()
|
cmdNamespace, _, err := f.DefaultNamespace()
|
||||||
|
@ -29,7 +29,7 @@ import (
|
|||||||
const (
|
const (
|
||||||
stop_long = `Deprecated: Gracefully shut down a resource by name or filename.
|
stop_long = `Deprecated: Gracefully shut down a resource by name or filename.
|
||||||
|
|
||||||
stop command is deprecated, all its functionalities are covered by delete command.
|
The stop command is deprecated, all its functionalities are covered by delete command.
|
||||||
See 'kubectl delete --help' for more details.
|
See 'kubectl delete --help' for more details.
|
||||||
|
|
||||||
Attempts to shut down and delete a resource that supports graceful termination.
|
Attempts to shut down and delete a resource that supports graceful termination.
|
||||||
@ -52,7 +52,7 @@ func NewCmdStop(f *cmdutil.Factory, out io.Writer) *cobra.Command {
|
|||||||
Filenames util.StringList
|
Filenames util.StringList
|
||||||
}{}
|
}{}
|
||||||
cmd := &cobra.Command{
|
cmd := &cobra.Command{
|
||||||
Use: "stop (-f FILENAME | RESOURCE (NAME | -l label | --all))",
|
Use: "stop (-f FILENAME | TYPE (NAME | -l label | --all))",
|
||||||
Short: "Deprecated: Gracefully shut down a resource by name or filename.",
|
Short: "Deprecated: Gracefully shut down a resource by name or filename.",
|
||||||
Long: stop_long,
|
Long: stop_long,
|
||||||
Example: stop_example,
|
Example: stop_example,
|
||||||
|
Loading…
Reference in New Issue
Block a user