Merge pull request #23305 from janetkuo/update-kubectl-help

Auto commit by PR queue bot
pull/6/head
k8s-merge-robot 2016-03-22 19:17:45 -07:00
commit 2f89867821
29 changed files with 126 additions and 112 deletions

View File

@ -3,7 +3,7 @@
.SH NAME .SH NAME
.PP .PP
kubectl autoscale \- Auto\-scale a deployment or replication controller kubectl autoscale \- Auto\-scale a Deployment, ReplicaSet, or ReplicationController
.SH SYNOPSIS .SH SYNOPSIS
@ -16,7 +16,7 @@ kubectl autoscale \- Auto\-scale a deployment or replication controller
Creates an autoscaler that automatically chooses and sets the number of pods that run in a kubernetes cluster. Creates an autoscaler that automatically chooses and sets the number of pods that run in a kubernetes cluster.
.PP .PP
Looks up a deployment or replication controller by name and creates an autoscaler that uses this deployment or replication controller as a reference. Looks up a Deployment, ReplicaSet, or ReplicationController by name and creates an autoscaler that uses the given resource as a reference.
An autoscaler can automatically increase or decrease number of pods deployed within the system as needed. An autoscaler can automatically increase or decrease number of pods deployed within the system as needed.

View File

@ -27,11 +27,11 @@ will first check for an exact match on TYPE and NAME\_PREFIX. If no such resourc
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
Possible resource types include (case insensitive): pods (po), services (svc), Possible resource types include (case insensitive): pods (po), services (svc), deployments,
replicationcontrollers (rc), nodes (no), events (ev), limitranges (limits), replicasets (rs), replicationcontrollers (rc), nodes (no), events (ev), limitranges (limits),
persistentvolumes (pv), persistentvolumeclaims (pvc), resourcequotas (quota), persistentvolumes (pv), persistentvolumeclaims (pvc), resourcequotas (quota), namespaces (ns),
namespaces (ns), serviceaccounts, horizontalpodautoscalers (hpa), serviceaccounts, ingresses (ing), horizontalpodautoscalers (hpa), daemonsets (ds), configmaps,
endpoints (ep) or secrets. componentstatuses (cs), endpoints (ep), and secrets.
.SH OPTIONS .SH OPTIONS

View File

@ -16,11 +16,11 @@ kubectl explain \- Documentation of resources.
Documentation of resources. Documentation of resources.
.PP .PP
Possible resource types include: pods (po), services (svc), Possible resource types include (case insensitive): pods (po), services (svc), deployments,
replicationcontrollers (rc), nodes (no), events (ev), componentstatuses (cs), replicasets (rs), replicationcontrollers (rc), nodes (no), events (ev), limitranges (limits),
limitranges (limits), persistentvolumes (pv), persistentvolumeclaims (pvc), persistentvolumes (pv), persistentvolumeclaims (pvc), resourcequotas (quota), namespaces (ns),
resourcequotas (quota), namespaces (ns), horizontalpodautoscalers (hpa) serviceaccounts, ingresses (ing), horizontalpodautoscalers (hpa), daemonsets (ds), configmaps,
or endpoints (ep). componentstatuses (cs), endpoints (ep), and secrets.
.SH OPTIONS .SH OPTIONS

View File

@ -3,7 +3,7 @@
.SH NAME .SH NAME
.PP .PP
kubectl expose \- Take a replication controller, service or pod and expose it as a new Kubernetes Service kubectl expose \- Take a replication controller, service, or pod and expose it as a new Kubernetes Service
.SH SYNOPSIS .SH SYNOPSIS
@ -13,15 +13,15 @@ kubectl expose \- Take a replication controller, service or pod and expose it as
.SH DESCRIPTION .SH DESCRIPTION
.PP .PP
Take a replication controller, service, replica set, deployment or pod and expose it as a new Kubernetes service. Take a deployment, service, replica set, replication controller, or pod and expose it as a new Kubernetes service.
.PP .PP
Looks up a replication controller, service, replica set, deployment or pod by name and uses the selector Looks up a deployment, service, replica set, replication controller or pod by name and uses the selector
for that resource as the selector for a new service on the specified port. A replica set will be exposed for that resource as the selector for a new service on the specified port. A deployment or replica set
as a service only if it's selector is convertible to a selector that service supports, i.e. when the will be exposed as a service only if its selector is convertible to a selector that service supports,
replica set selector contains only the matchLabels component. Note that if no port is specified i.e. when the selector contains only the matchLabels component. Note that if no port is specified via
via \-\-port and the exposed resource has multiple ports, all will be re\-used by the new service. Also \-\-port and the exposed resource has multiple ports, all will be re\-used by the new service. Also if no
if no labels are specified, the new service will re\-use the labels from the resource it exposes. labels are specified, the new service will re\-use the labels from the resource it exposes.
.SH OPTIONS .SH OPTIONS

View File

@ -16,11 +16,11 @@ kubectl get \- Display one or many resources
Display one or many resources. Display one or many resources.
.PP .PP
Possible resource types include (case insensitive): pods (po), services (svc), Possible resource types include (case insensitive): pods (po), services (svc), deployments,
replicationcontrollers (rc), nodes (no), events (ev), componentstatuses (cs), replicasets (rs), replicationcontrollers (rc), nodes (no), events (ev), limitranges (limits),
limitranges (limits), persistentvolumes (pv), persistentvolumeclaims (pvc), persistentvolumes (pv), persistentvolumeclaims (pvc), resourcequotas (quota), namespaces (ns),
resourcequotas (quota), namespaces (ns), endpoints (ep), serviceaccounts, ingresses (ing), horizontalpodautoscalers (hpa), daemonsets (ds), configmaps,
horizontalpodautoscalers (hpa), serviceaccounts or secrets. componentstatuses (cs), endpoints (ep), and secrets.
.PP .PP
By specifying the output as 'template' and providing a Go template as the value By specifying the output as 'template' and providing a Go template as the value

View File

@ -13,7 +13,7 @@ kubectl rollout history \- view rollout history
.SH DESCRIPTION .SH DESCRIPTION
.PP .PP
view previous rollout revisions and configurations. View previous rollout revisions and configurations.
.SH OPTIONS .SH OPTIONS
@ -128,6 +128,9 @@ view previous rollout revisions and configurations.
# View the rollout history of a deployment # View the rollout history of a deployment
kubectl rollout history deployment/abc kubectl rollout history deployment/abc
# View the details of deployment revision 3
kubectl rollout history deployment/abc \-\-revision=3
.fi .fi
.RE .RE

View File

@ -13,7 +13,7 @@ kubectl rollout undo \- undoes a previous rollout
.SH DESCRIPTION .SH DESCRIPTION
.PP .PP
undo rolls back to a previous rollout. Rollback to a previous rollout.
.SH OPTIONS .SH OPTIONS
@ -128,6 +128,9 @@ undo rolls back to a previous rollout.
# Rollback to the previous deployment # Rollback to the previous deployment
kubectl rollout undo deployment/abc kubectl rollout undo deployment/abc
# Rollback to deployment revision 3
kubectl rollout undo deployment/abc \-\-to\-revision=3
.fi .fi
.RE .RE

View File

@ -13,7 +13,7 @@ kubectl rollout \- rollout manages a deployment
.SH DESCRIPTION .SH DESCRIPTION
.PP .PP
rollout manages a deployment using subcommands like "kubectl rollout undo deployment/abc" Manages a deployment using subcommands like "kubectl rollout undo deployment/abc"
.SH OPTIONS INHERITED FROM PARENT COMMANDS .SH OPTIONS INHERITED FROM PARENT COMMANDS

View File

@ -3,7 +3,7 @@
.SH NAME .SH NAME
.PP .PP
kubectl scale \- Set a new size for a Replication Controller, Job, or Deployment. kubectl scale \- Set a new size for a Deployment, ReplicaSet, Replication Controller, or Job.
.SH SYNOPSIS .SH SYNOPSIS
@ -13,7 +13,7 @@ kubectl scale \- Set a new size for a Replication Controller, Job, or Deployment
.SH DESCRIPTION .SH DESCRIPTION
.PP .PP
Set a new size for a Replication Controller, Job, or Deployment. Set a new size for a Deployment, ReplicaSet, Replication Controller, or Job.
.PP .PP
Scale also allows users to specify one or more preconditions for the scale action. Scale also allows users to specify one or more preconditions for the scale action.
@ -151,8 +151,8 @@ scale is sent to the server.
.RS .RS
.nf .nf
# Scale replication controller named 'foo' to 3. # Scale a replicaset named 'foo' to 3.
kubectl scale \-\-replicas=3 rc/foo kubectl scale \-\-replicas=3 rs/foo
# Scale a resource identified by type and name specified in "foo.yaml" to 3. # Scale a resource identified by type and name specified in "foo.yaml" to 3.
kubectl scale \-\-replicas=3 \-f foo.yaml kubectl scale \-\-replicas=3 \-f foo.yaml

View File

@ -80,7 +80,7 @@ kubectl
* [kubectl api-versions](kubectl_api-versions.md) - Print the supported API versions on the server, in the form of "group/version". * [kubectl api-versions](kubectl_api-versions.md) - Print the supported API versions on the server, in the form of "group/version".
* [kubectl apply](kubectl_apply.md) - Apply a configuration to a resource by filename or stdin * [kubectl apply](kubectl_apply.md) - Apply a configuration to a resource by filename or stdin
* [kubectl attach](kubectl_attach.md) - Attach to a running container. * [kubectl attach](kubectl_attach.md) - Attach to a running container.
* [kubectl autoscale](kubectl_autoscale.md) - Auto-scale a deployment or replication controller * [kubectl autoscale](kubectl_autoscale.md) - Auto-scale a Deployment, ReplicaSet, or ReplicationController
* [kubectl cluster-info](kubectl_cluster-info.md) - Display cluster info * [kubectl cluster-info](kubectl_cluster-info.md) - Display cluster info
* [kubectl config](kubectl_config.md) - config modifies kubeconfig files * [kubectl config](kubectl_config.md) - config modifies kubeconfig files
* [kubectl convert](kubectl_convert.md) - Convert config files between different API versions * [kubectl convert](kubectl_convert.md) - Convert config files between different API versions
@ -92,7 +92,7 @@ kubectl
* [kubectl edit](kubectl_edit.md) - Edit a resource on the server * [kubectl edit](kubectl_edit.md) - Edit a resource on the server
* [kubectl exec](kubectl_exec.md) - Execute a command in a container. * [kubectl exec](kubectl_exec.md) - Execute a command in a container.
* [kubectl explain](kubectl_explain.md) - Documentation of resources. * [kubectl explain](kubectl_explain.md) - Documentation of resources.
* [kubectl expose](kubectl_expose.md) - Take a replication controller, service or pod and expose it as a new Kubernetes Service * [kubectl expose](kubectl_expose.md) - Take a replication controller, service, or pod and expose it as a new Kubernetes Service
* [kubectl get](kubectl_get.md) - Display one or many resources * [kubectl get](kubectl_get.md) - Display one or many resources
* [kubectl label](kubectl_label.md) - Update the labels on a resource * [kubectl label](kubectl_label.md) - Update the labels on a resource
* [kubectl logs](kubectl_logs.md) - Print the logs for a container in a pod. * [kubectl logs](kubectl_logs.md) - Print the logs for a container in a pod.
@ -104,11 +104,11 @@ kubectl
* [kubectl rolling-update](kubectl_rolling-update.md) - Perform a rolling update of the given ReplicationController. * [kubectl rolling-update](kubectl_rolling-update.md) - Perform a rolling update of the given ReplicationController.
* [kubectl rollout](kubectl_rollout.md) - rollout manages a deployment * [kubectl rollout](kubectl_rollout.md) - rollout manages a deployment
* [kubectl run](kubectl_run.md) - Run a particular image on the cluster. * [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, Job, or Deployment. * [kubectl scale](kubectl_scale.md) - Set a new size for a Deployment, ReplicaSet, Replication Controller, or Job.
* [kubectl uncordon](kubectl_uncordon.md) - Mark node as schedulable * [kubectl uncordon](kubectl_uncordon.md) - Mark node as schedulable
* [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 on 2-Mar-2016 ###### Auto generated by spf13/cobra on 22-Mar-2016
<!-- BEGIN MUNGE: GENERATED_ANALYTICS --> <!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl.md?pixel)]()

View File

@ -34,14 +34,14 @@ Documentation for other releases can be found at
## kubectl autoscale ## kubectl autoscale
Auto-scale a deployment or replication controller Auto-scale a Deployment, ReplicaSet, or ReplicationController
### Synopsis ### Synopsis
Creates an autoscaler that automatically chooses and sets the number of pods that run in a kubernetes cluster. Creates an autoscaler that automatically chooses and sets the number of pods that run in a kubernetes cluster.
Looks up a deployment or replication controller by name and creates an autoscaler that uses this deployment or replication controller as a reference. Looks up a Deployment, ReplicaSet, or ReplicationController by name and creates an autoscaler that uses the given resource as a reference.
An autoscaler can automatically increase or decrease number of pods deployed within the system as needed. An autoscaler can automatically increase or decrease number of pods deployed within the system as needed.
``` ```
@ -110,7 +110,7 @@ kubectl autoscale rc foo --max=5 --cpu-percent=80
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra on 2-Mar-2016 ###### Auto generated by spf13/cobra on 22-Mar-2016
<!-- BEGIN MUNGE: GENERATED_ANALYTICS --> <!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_autoscale.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_autoscale.md?pixel)]()

View File

@ -49,11 +49,11 @@ $ kubectl describe TYPE NAME_PREFIX
will first check for an exact match on TYPE 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 resource types include (case insensitive): pods (po), services (svc), Possible resource types include (case insensitive): pods (po), services (svc), deployments,
replicationcontrollers (rc), nodes (no), events (ev), limitranges (limits), replicasets (rs), replicationcontrollers (rc), nodes (no), events (ev), limitranges (limits),
persistentvolumes (pv), persistentvolumeclaims (pvc), resourcequotas (quota), persistentvolumes (pv), persistentvolumeclaims (pvc), resourcequotas (quota), namespaces (ns),
namespaces (ns), serviceaccounts, horizontalpodautoscalers (hpa), serviceaccounts, ingresses (ing), horizontalpodautoscalers (hpa), daemonsets (ds), configmaps,
endpoints (ep) or secrets. componentstatuses (cs), endpoints (ep), and secrets.
``` ```
kubectl describe (-f FILENAME | TYPE [NAME_PREFIX | -l label] | TYPE/NAME) kubectl describe (-f FILENAME | TYPE [NAME_PREFIX | -l label] | TYPE/NAME)
@ -120,7 +120,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 on 2-Mar-2016 ###### Auto generated by spf13/cobra on 22-Mar-2016
<!-- BEGIN MUNGE: GENERATED_ANALYTICS --> <!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_describe.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_describe.md?pixel)]()

View File

@ -41,11 +41,11 @@ Documentation of resources.
Documentation of resources. Documentation of resources.
Possible resource types include: pods (po), services (svc), Possible resource types include (case insensitive): pods (po), services (svc), deployments,
replicationcontrollers (rc), nodes (no), events (ev), componentstatuses (cs), replicasets (rs), replicationcontrollers (rc), nodes (no), events (ev), limitranges (limits),
limitranges (limits), persistentvolumes (pv), persistentvolumeclaims (pvc), persistentvolumes (pv), persistentvolumeclaims (pvc), resourcequotas (quota), namespaces (ns),
resourcequotas (quota), namespaces (ns), horizontalpodautoscalers (hpa) serviceaccounts, ingresses (ing), horizontalpodautoscalers (hpa), daemonsets (ds), configmaps,
or endpoints (ep). componentstatuses (cs), endpoints (ep), and secrets.
``` ```
kubectl explain RESOURCE kubectl explain RESOURCE
@ -98,7 +98,7 @@ kubectl explain pods.spec.containers
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra on 2-Mar-2016 ###### Auto generated by spf13/cobra on 22-Mar-2016
<!-- BEGIN MUNGE: GENERATED_ANALYTICS --> <!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_explain.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_explain.md?pixel)]()

View File

@ -34,19 +34,19 @@ Documentation for other releases can be found at
## kubectl expose ## kubectl expose
Take a replication controller, service or pod and expose it as a new Kubernetes Service Take a replication controller, service, or pod and expose it as a new Kubernetes Service
### Synopsis ### Synopsis
Take a replication controller, service, replica set, deployment or pod and expose it as a new Kubernetes service. Take a deployment, service, replica set, replication controller, or pod and expose it as a new Kubernetes service.
Looks up a replication controller, service, replica set, deployment or pod by name and uses the selector Looks up a deployment, service, replica set, replication controller or pod by name and uses the selector
for that resource as the selector for a new service on the specified port. A replica set will be exposed for that resource as the selector for a new service on the specified port. A deployment or replica set
as a service only if it's selector is convertible to a selector that service supports, i.e. when the will be exposed as a service only if its selector is convertible to a selector that service supports,
replica set selector contains only the matchLabels component. Note that if no port is specified i.e. when the selector contains only the matchLabels component. Note that if no port is specified via
via --port and the exposed resource has multiple ports, all will be re-used by the new service. Also --port and the exposed resource has multiple ports, all will be re-used by the new service. Also if no
if no labels are specified, the new service will re-use the labels from the resource it exposes. labels are specified, the new service will re-use the labels from the resource it exposes.
``` ```
kubectl expose (-f FILENAME | TYPE NAME) [--port=port] [--protocol=TCP|UDP] [--target-port=number-or-name] [--name=name] [--external-ip=external-ip-of-service] [--type=type] kubectl expose (-f FILENAME | TYPE NAME) [--port=port] [--protocol=TCP|UDP] [--target-port=number-or-name] [--name=name] [--external-ip=external-ip-of-service] [--type=type]
@ -137,7 +137,7 @@ kubectl expose deployment nginx --port=80 --target-port=8000
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra on 19-Mar-2016 ###### Auto generated by spf13/cobra on 22-Mar-2016
<!-- BEGIN MUNGE: GENERATED_ANALYTICS --> <!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_expose.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_expose.md?pixel)]()

View File

@ -41,11 +41,11 @@ Display one or many resources
Display one or many resources. Display one or many resources.
Possible resource types include (case insensitive): pods (po), services (svc), Possible resource types include (case insensitive): pods (po), services (svc), deployments,
replicationcontrollers (rc), nodes (no), events (ev), componentstatuses (cs), replicasets (rs), replicationcontrollers (rc), nodes (no), events (ev), limitranges (limits),
limitranges (limits), persistentvolumes (pv), persistentvolumeclaims (pvc), persistentvolumes (pv), persistentvolumeclaims (pvc), resourcequotas (quota), namespaces (ns),
resourcequotas (quota), namespaces (ns), endpoints (ep), serviceaccounts, ingresses (ing), horizontalpodautoscalers (hpa), daemonsets (ds), configmaps,
horizontalpodautoscalers (hpa), serviceaccounts or secrets. componentstatuses (cs), endpoints (ep), and secrets.
By specifying the output as 'template' and providing a Go template as the value 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).
@ -132,7 +132,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 on 2-Mar-2016 ###### Auto generated by spf13/cobra on 22-Mar-2016
<!-- BEGIN MUNGE: GENERATED_ANALYTICS --> <!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_get.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_get.md?pixel)]()

View File

@ -39,7 +39,7 @@ rollout manages a deployment
### Synopsis ### Synopsis
rollout manages a deployment using subcommands like "kubectl rollout undo deployment/abc" Manages a deployment using subcommands like "kubectl rollout undo deployment/abc"
``` ```
kubectl rollout SUBCOMMAND kubectl rollout SUBCOMMAND
@ -87,7 +87,7 @@ kubectl rollout undo deployment/abc
* [kubectl rollout resume](kubectl_rollout_resume.md) - Resume a paused resource * [kubectl rollout resume](kubectl_rollout_resume.md) - Resume a paused resource
* [kubectl rollout undo](kubectl_rollout_undo.md) - undoes a previous rollout * [kubectl rollout undo](kubectl_rollout_undo.md) - undoes a previous rollout
###### Auto generated by spf13/cobra on 2-Mar-2016 ###### Auto generated by spf13/cobra on 21-Mar-2016
<!-- BEGIN MUNGE: GENERATED_ANALYTICS --> <!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_rollout.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_rollout.md?pixel)]()

View File

@ -39,7 +39,7 @@ view rollout history
### Synopsis ### Synopsis
view previous rollout revisions and configurations. View previous rollout revisions and configurations.
``` ```
kubectl rollout history (TYPE NAME | TYPE/NAME) [flags] kubectl rollout history (TYPE NAME | TYPE/NAME) [flags]
@ -50,6 +50,9 @@ kubectl rollout history (TYPE NAME | TYPE/NAME) [flags]
``` ```
# View the rollout history of a deployment # View the rollout history of a deployment
kubectl rollout history deployment/abc kubectl rollout history deployment/abc
# View the details of deployment revision 3
kubectl rollout history deployment/abc --revision=3
``` ```
### Options ### Options
@ -90,7 +93,7 @@ kubectl rollout history deployment/abc
* [kubectl rollout](kubectl_rollout.md) - rollout manages a deployment * [kubectl rollout](kubectl_rollout.md) - rollout manages a deployment
###### Auto generated by spf13/cobra on 2-Mar-2016 ###### Auto generated by spf13/cobra on 21-Mar-2016
<!-- BEGIN MUNGE: GENERATED_ANALYTICS --> <!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_rollout_history.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_rollout_history.md?pixel)]()

View File

@ -39,7 +39,7 @@ undoes a previous rollout
### Synopsis ### Synopsis
undo rolls back to a previous rollout. Rollback to a previous rollout.
``` ```
kubectl rollout undo (TYPE NAME | TYPE/NAME) [flags] kubectl rollout undo (TYPE NAME | TYPE/NAME) [flags]
@ -50,6 +50,9 @@ kubectl rollout undo (TYPE NAME | TYPE/NAME) [flags]
``` ```
# Rollback to the previous deployment # Rollback to the previous deployment
kubectl rollout undo deployment/abc kubectl rollout undo deployment/abc
# Rollback to deployment revision 3
kubectl rollout undo deployment/abc --to-revision=3
``` ```
### Options ### Options
@ -90,7 +93,7 @@ kubectl rollout undo deployment/abc
* [kubectl rollout](kubectl_rollout.md) - rollout manages a deployment * [kubectl rollout](kubectl_rollout.md) - rollout manages a deployment
###### Auto generated by spf13/cobra on 2-Mar-2016 ###### Auto generated by spf13/cobra on 21-Mar-2016
<!-- BEGIN MUNGE: GENERATED_ANALYTICS --> <!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_rollout_undo.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_rollout_undo.md?pixel)]()

View File

@ -34,12 +34,12 @@ Documentation for other releases can be found at
## kubectl scale ## kubectl scale
Set a new size for a Replication Controller, Job, or Deployment. Set a new size for a Deployment, ReplicaSet, Replication Controller, or Job.
### Synopsis ### Synopsis
Set a new size for a Replication Controller, Job, or Deployment. Set a new size for a Deployment, ReplicaSet, Replication Controller, or Job.
Scale also allows users to specify one or more preconditions for the scale action. Scale also allows users to specify one or more preconditions for the scale action.
If --current-replicas or --resource-version is specified, it is validated before the If --current-replicas or --resource-version is specified, it is validated before the
@ -53,8 +53,8 @@ kubectl scale [--resource-version=version] [--current-replicas=count] --replicas
### Examples ### Examples
``` ```
# Scale replication controller named 'foo' to 3. # Scale a replicaset named 'foo' to 3.
kubectl scale --replicas=3 rc/foo kubectl scale --replicas=3 rs/foo
# Scale a resource identified by type and name specified in "foo.yaml" to 3. # Scale a resource identified by type and name specified in "foo.yaml" to 3.
kubectl scale --replicas=3 -f foo.yaml kubectl scale --replicas=3 -f foo.yaml
@ -112,7 +112,7 @@ kubectl scale --replicas=3 job/cron
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra on 2-Mar-2016 ###### Auto generated by spf13/cobra on 22-Mar-2016
<!-- BEGIN MUNGE: GENERATED_ANALYTICS --> <!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_scale.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_scale.md?pixel)]()

View File

@ -31,7 +31,7 @@ import (
const ( const (
autoscaleLong = `Creates an autoscaler that automatically chooses and sets the number of pods that run in a kubernetes cluster. autoscaleLong = `Creates an autoscaler that automatically chooses and sets the number of pods that run in a kubernetes cluster.
Looks up a deployment or replication controller by name and creates an autoscaler that uses this deployment or replication controller as a reference. Looks up a Deployment, ReplicaSet, or ReplicationController by name and creates an autoscaler that uses the given resource as a reference.
An autoscaler can automatically increase or decrease number of pods deployed within the system as needed.` An autoscaler can automatically increase or decrease number of pods deployed within the system as needed.`
autoscaleExample = `# Auto scale a deployment "foo", with the number of pods between 2 to 10, target CPU utilization at a default value that server applies: autoscaleExample = `# Auto scale a deployment "foo", with the number of pods between 2 to 10, target CPU utilization at a default value that server applies:
@ -45,7 +45,7 @@ func NewCmdAutoscale(f *cmdutil.Factory, out io.Writer) *cobra.Command {
filenames := []string{} filenames := []string{}
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "autoscale (-f FILENAME | TYPE NAME | TYPE/NAME) [--min=MINPODS] --max=MAXPODS [--cpu-percent=CPU] [flags]", Use: "autoscale (-f FILENAME | TYPE NAME | TYPE/NAME) [--min=MINPODS] --max=MAXPODS [--cpu-percent=CPU] [flags]",
Short: "Auto-scale a deployment or replication controller", Short: "Auto-scale a Deployment, ReplicaSet, or ReplicationController",
Long: autoscaleLong, Long: autoscaleLong,
Example: autoscaleExample, Example: autoscaleExample,
Run: func(cmd *cobra.Command, args []string) { Run: func(cmd *cobra.Command, args []string) {

View File

@ -49,11 +49,7 @@ $ kubectl describe TYPE NAME_PREFIX
will first check for an exact match on TYPE 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 resource types include (case insensitive): pods (po), services (svc), ` + kubectl.PossibleResourceTypes
replicationcontrollers (rc), nodes (no), events (ev), limitranges (limits),
persistentvolumes (pv), persistentvolumeclaims (pvc), resourcequotas (quota),
namespaces (ns), serviceaccounts, horizontalpodautoscalers (hpa),
endpoints (ep) or secrets.`
describe_example = `# Describe a node describe_example = `# Describe a node
kubectl describe nodes kubernetes-minion-emt8.c.myproject.internal kubectl describe nodes kubernetes-minion-emt8.c.myproject.internal

View File

@ -36,11 +36,7 @@ kubectl explain pods.spec.containers`
explainLong = `Documentation of resources. explainLong = `Documentation of resources.
Possible resource types include: pods (po), services (svc), ` + kubectl.PossibleResourceTypes
replicationcontrollers (rc), nodes (no), events (ev), componentstatuses (cs),
limitranges (limits), persistentvolumes (pv), persistentvolumeclaims (pvc),
resourcequotas (quota), namespaces (ns), horizontalpodautoscalers (hpa)
or endpoints (ep).`
) )
// NewCmdExplain returns a cobra command for swagger docs // NewCmdExplain returns a cobra command for swagger docs

View File

@ -37,14 +37,14 @@ type ExposeOptions struct {
} }
const ( const (
expose_long = `Take a replication controller, service, replica set, deployment or pod and expose it as a new Kubernetes service. expose_long = `Take a deployment, service, replica set, replication controller, or pod and expose it as a new Kubernetes service.
Looks up a replication controller, service, replica set, deployment or pod by name and uses the selector Looks up a deployment, service, replica set, replication controller or pod by name and uses the selector
for that resource as the selector for a new service on the specified port. A replica set will be exposed for that resource as the selector for a new service on the specified port. A deployment or replica set
as a service only if it's selector is convertible to a selector that service supports, i.e. when the will be exposed as a service only if its selector is convertible to a selector that service supports,
replica set selector contains only the matchLabels component. Note that if no port is specified i.e. when the selector contains only the matchLabels component. Note that if no port is specified via
via --port and the exposed resource has multiple ports, all will be re-used by the new service. Also --port and the exposed resource has multiple ports, all will be re-used by the new service. Also if no
if no labels are specified, the new service will re-use the labels from the resource it exposes.` labels are specified, the new service will re-use the labels from the resource it exposes.`
expose_example = `# Create a service for a replicated nginx, which serves on port 80 and connects to the containers on port 8000. expose_example = `# Create a service for a replicated nginx, which serves on port 80 and connects to the containers on port 8000.
kubectl expose rc nginx --port=80 --target-port=8000 kubectl expose rc nginx --port=80 --target-port=8000
@ -73,7 +73,7 @@ func NewCmdExposeService(f *cmdutil.Factory, out io.Writer) *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "expose (-f FILENAME | TYPE NAME) [--port=port] [--protocol=TCP|UDP] [--target-port=number-or-name] [--name=name] [--external-ip=external-ip-of-service] [--type=type]", Use: "expose (-f FILENAME | TYPE NAME) [--port=port] [--protocol=TCP|UDP] [--target-port=number-or-name] [--name=name] [--external-ip=external-ip-of-service] [--type=type]",
Short: "Take a replication controller, service or pod and expose it as a new Kubernetes Service", Short: "Take a replication controller, service, or pod and expose it as a new Kubernetes Service",
Long: expose_long, Long: expose_long,
Example: expose_example, Example: expose_example,
Run: func(cmd *cobra.Command, args []string) { Run: func(cmd *cobra.Command, args []string) {

View File

@ -38,11 +38,7 @@ type GetOptions struct {
const ( const (
get_long = `Display one or many resources. get_long = `Display one or many resources.
Possible resource types include (case insensitive): pods (po), services (svc), ` + kubectl.PossibleResourceTypes + `
replicationcontrollers (rc), nodes (no), events (ev), componentstatuses (cs),
limitranges (limits), persistentvolumes (pv), persistentvolumeclaims (pvc),
resourcequotas (quota), namespaces (ns), endpoints (ep),
horizontalpodautoscalers (hpa), serviceaccounts or secrets.
By specifying the output as 'template' and providing a Go template as the value 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).`

View File

@ -24,7 +24,7 @@ import (
) )
const ( const (
rollout_long = `rollout manages a deployment using subcommands like "kubectl rollout undo deployment/abc"` rollout_long = `Manages a deployment using subcommands like "kubectl rollout undo deployment/abc"`
rollout_example = `# Rollback to the previous deployment rollout_example = `# Rollback to the previous deployment
kubectl rollout undo deployment/abc` kubectl rollout undo deployment/abc`
rollout_valid_resources = `Valid resource types include: rollout_valid_resources = `Valid resource types include:

View File

@ -35,9 +35,12 @@ type HistoryOptions struct {
} }
const ( const (
history_long = `view previous rollout revisions and configurations.` history_long = `View previous rollout revisions and configurations.`
history_example = `# View the rollout history of a deployment history_example = `# View the rollout history of a deployment
kubectl rollout history deployment/abc` kubectl rollout history deployment/abc
# View the details of deployment revision 3
kubectl rollout history deployment/abc --revision=3`
) )
func NewCmdRolloutHistory(f *cmdutil.Factory, out io.Writer) *cobra.Command { func NewCmdRolloutHistory(f *cmdutil.Factory, out io.Writer) *cobra.Command {

View File

@ -42,9 +42,12 @@ type UndoOptions struct {
} }
const ( const (
undo_long = `undo rolls back to a previous rollout.` undo_long = `Rollback to a previous rollout.`
undo_example = `# Rollback to the previous deployment undo_example = `# Rollback to the previous deployment
kubectl rollout undo deployment/abc` kubectl rollout undo deployment/abc
# Rollback to deployment revision 3
kubectl rollout undo deployment/abc --to-revision=3`
) )
func NewCmdRolloutUndo(f *cmdutil.Factory, out io.Writer) *cobra.Command { func NewCmdRolloutUndo(f *cmdutil.Factory, out io.Writer) *cobra.Command {

View File

@ -37,14 +37,14 @@ type ScaleOptions struct {
} }
const ( const (
scale_long = `Set a new size for a Replication Controller, Job, or Deployment. scale_long = `Set a new size for a Deployment, ReplicaSet, Replication Controller, or Job.
Scale also allows users to specify one or more preconditions for the scale action. Scale also allows users to specify one or more preconditions for the scale action.
If --current-replicas or --resource-version is specified, it is validated before the If --current-replicas or --resource-version is specified, it is validated before the
scale is attempted, and it is guaranteed that the precondition holds true when the scale is attempted, and it is guaranteed that the precondition holds true when the
scale is sent to the server.` scale is sent to the server.`
scale_example = `# Scale replication controller named 'foo' to 3. scale_example = `# Scale a replicaset named 'foo' to 3.
kubectl scale --replicas=3 rc/foo kubectl scale --replicas=3 rs/foo
# Scale a resource identified by type and name specified in "foo.yaml" to 3. # Scale a resource identified by type and name specified in "foo.yaml" to 3.
kubectl scale --replicas=3 -f foo.yaml kubectl scale --replicas=3 -f foo.yaml
@ -67,7 +67,7 @@ func NewCmdScale(f *cmdutil.Factory, out io.Writer) *cobra.Command {
Use: "scale [--resource-version=version] [--current-replicas=count] --replicas=COUNT (-f FILENAME | TYPE NAME)", Use: "scale [--resource-version=version] [--current-replicas=count] --replicas=COUNT (-f FILENAME | TYPE NAME)",
// resize is deprecated // resize is deprecated
Aliases: []string{"resize"}, Aliases: []string{"resize"},
Short: "Set a new size for a Replication Controller, Job, or Deployment.", Short: "Set a new size for a Deployment, ReplicaSet, Replication Controller, or Job.",
Long: scale_long, Long: scale_long,
Example: scale_example, Example: scale_example,
Run: func(cmd *cobra.Command, args []string) { Run: func(cmd *cobra.Command, args []string) {

View File

@ -28,7 +28,15 @@ import (
"k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/api/unversioned"
) )
const kubectlAnnotationPrefix = "kubectl.kubernetes.io/" const (
kubectlAnnotationPrefix = "kubectl.kubernetes.io/"
// TODO: auto-generate this
PossibleResourceTypes = `Possible resource types include (case insensitive): pods (po), services (svc), deployments,
replicasets (rs), replicationcontrollers (rc), nodes (no), events (ev), limitranges (limits),
persistentvolumes (pv), persistentvolumeclaims (pvc), resourcequotas (quota), namespaces (ns),
serviceaccounts, ingresses (ing), horizontalpodautoscalers (hpa), daemonsets (ds), configmaps,
componentstatuses (cs), endpoints (ep), and secrets.`
)
type NamespaceInfo struct { type NamespaceInfo struct {
Namespace string Namespace string