Skip to content

Commit

Permalink
Updated kubectl help messages.
Browse files Browse the repository at this point in the history
Updated kubectl help messages: added info about hpa. Fixes kubernetes#17357.
  • Loading branch information
jszczepkowski committed Nov 27, 2015
1 parent 4f207eb commit 2d396b0
Show file tree
Hide file tree
Showing 11 changed files with 129 additions and 41 deletions.
2 changes: 1 addition & 1 deletion docs/man/man1/kubectl-annotate.1
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ If \-\-resource\-version is specified, then updates will use this resource versi
Possible resources include (case insensitive): pods (po), services (svc),
replicationcontrollers (rc), nodes (no), events (ev), componentstatuses (cs),
limitranges (limits), persistentvolumes (pv), persistentvolumeclaims (pvc),
resourcequotas (quota) or secrets.
horizontalpodautoscalers (hpa), resourcequotas (quota) or secrets.


.SH OPTIONS
Expand Down
2 changes: 1 addition & 1 deletion docs/man/man1/kubectl-describe.1
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ exists, it will output details for every resource that has a name prefixed with
Possible resource types include (case insensitive): pods (po), services (svc),
replicationcontrollers (rc), nodes (no), events (ev), limitranges (limits),
persistentvolumes (pv), persistentvolumeclaims (pvc), resourcequotas (quota),
namespaces (ns), serviceaccounts or secrets.
namespaces (ns), serviceaccounts, horizontalpodautoscalers (hpa), or secrets.


.SH OPTIONS
Expand Down
3 changes: 2 additions & 1 deletion docs/man/man1/kubectl-get.1
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ Display one or many resources.
Possible resource types include (case insensitive): pods (po), services (svc),
replicationcontrollers (rc), nodes (no), events (ev), componentstatuses (cs),
limitranges (limits), persistentvolumes (pv), persistentvolumeclaims (pvc),
resourcequotas (quota), namespaces (ns), endpoints (ep), serviceaccounts or secrets.
resourcequotas (quota), namespaces (ns), endpoints (ep),
horizontalpodautoscalers (hpa), serviceaccounts or secrets.

.PP
By specifying the output as 'template' and providing a Go template as the value
Expand Down
39 changes: 30 additions & 9 deletions docs/user-guide/kubectl/kubectl_annotate.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
<!-- BEGIN MUNGE: UNVERSIONED_WARNING -->

<!-- BEGIN STRIP_FOR_RELEASE -->

<img src="http://kubernetes.io/img/warning.png" alt="WARNING"
width="25" height="25">
<img src="http://kubernetes.io/img/warning.png" alt="WARNING"
width="25" height="25">
<img src="http://kubernetes.io/img/warning.png" alt="WARNING"
width="25" height="25">
<img src="http://kubernetes.io/img/warning.png" alt="WARNING"
width="25" height="25">
<img src="http://kubernetes.io/img/warning.png" alt="WARNING"
width="25" height="25">

<h2>PLEASE NOTE: This document applies to the HEAD of the source tree</h2>

If you are using a released version of Kubernetes, you should
refer to the docs that go with that version.

<strong>
The latest 1.0.x release of this document can be found
[here](http://releases.k8s.io/release-1.0/docs/user-guide/kubectl/kubectl_annotate.md).

Documentation for other releases can be found at
[releases.k8s.io](http://releases.k8s.io).
</strong>
--

<!-- END STRIP_FOR_RELEASE -->

<!-- END MUNGE: UNVERSIONED_WARNING -->

Expand All @@ -20,7 +48,7 @@ If --resource-version is specified, then updates will use this resource version,
Possible resources include (case insensitive): pods (po), services (svc),
replicationcontrollers (rc), nodes (no), events (ev), componentstatuses (cs),
limitranges (limits), persistentvolumes (pv), persistentvolumeclaims (pvc),
resourcequotas (quota) or secrets.
horizontalpodautoscalers (hpa), resourcequotas (quota) or secrets.

```
kubectl annotate [--overwrite] (-f FILENAME | TYPE NAME) KEY_1=VAL_1 ... KEY_N=VAL_N [--resource-version=version]
Expand Down Expand Up @@ -91,14 +119,7 @@ $ kubectl annotate pods foo description-

* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager

###### Auto generated by spf13/cobra at 2015-09-10 18:53:03.16095949 +0000 UTC



<!-- BEGIN MUNGE: IS_VERSIONED -->
<!-- TAG IS_VERSIONED -->
<!-- END MUNGE: IS_VERSIONED -->

###### Auto generated by spf13/cobra at 2015-11-27 14:20:04.945134857 +0000 UTC

<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_annotate.md?pixel)]()
Expand Down
39 changes: 30 additions & 9 deletions docs/user-guide/kubectl/kubectl_describe.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
<!-- BEGIN MUNGE: UNVERSIONED_WARNING -->

<!-- BEGIN STRIP_FOR_RELEASE -->

<img src="http://kubernetes.io/img/warning.png" alt="WARNING"
width="25" height="25">
<img src="http://kubernetes.io/img/warning.png" alt="WARNING"
width="25" height="25">
<img src="http://kubernetes.io/img/warning.png" alt="WARNING"
width="25" height="25">
<img src="http://kubernetes.io/img/warning.png" alt="WARNING"
width="25" height="25">
<img src="http://kubernetes.io/img/warning.png" alt="WARNING"
width="25" height="25">

<h2>PLEASE NOTE: This document applies to the HEAD of the source tree</h2>

If you are using a released version of Kubernetes, you should
refer to the docs that go with that version.

<strong>
The latest 1.0.x release of this document can be found
[here](http://releases.k8s.io/release-1.0/docs/user-guide/kubectl/kubectl_describe.md).

Documentation for other releases can be found at
[releases.k8s.io](http://releases.k8s.io).
</strong>
--

<!-- END STRIP_FOR_RELEASE -->

<!-- END MUNGE: UNVERSIONED_WARNING -->

Expand All @@ -23,7 +51,7 @@ exists, it will output details for every resource that has a name prefixed with
Possible resource types include (case insensitive): pods (po), services (svc),
replicationcontrollers (rc), nodes (no), events (ev), limitranges (limits),
persistentvolumes (pv), persistentvolumeclaims (pvc), resourcequotas (quota),
namespaces (ns), serviceaccounts or secrets.
namespaces (ns), serviceaccounts, horizontalpodautoscalers (hpa), or secrets.

```
kubectl describe (-f FILENAME | TYPE [NAME_PREFIX | -l label] | TYPE/NAME)
Expand Down Expand Up @@ -91,14 +119,7 @@ $ kubectl describe pods frontend

* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager

###### Auto generated by spf13/cobra at 2015-09-10 18:53:03.152057668 +0000 UTC



<!-- BEGIN MUNGE: IS_VERSIONED -->
<!-- TAG IS_VERSIONED -->
<!-- END MUNGE: IS_VERSIONED -->

###### Auto generated by spf13/cobra at 2015-11-27 14:20:04.941871459 +0000 UTC

<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_describe.md?pixel)]()
Expand Down
40 changes: 31 additions & 9 deletions docs/user-guide/kubectl/kubectl_get.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
<!-- BEGIN MUNGE: UNVERSIONED_WARNING -->

<!-- BEGIN STRIP_FOR_RELEASE -->

<img src="http://kubernetes.io/img/warning.png" alt="WARNING"
width="25" height="25">
<img src="http://kubernetes.io/img/warning.png" alt="WARNING"
width="25" height="25">
<img src="http://kubernetes.io/img/warning.png" alt="WARNING"
width="25" height="25">
<img src="http://kubernetes.io/img/warning.png" alt="WARNING"
width="25" height="25">
<img src="http://kubernetes.io/img/warning.png" alt="WARNING"
width="25" height="25">

<h2>PLEASE NOTE: This document applies to the HEAD of the source tree</h2>

If you are using a released version of Kubernetes, you should
refer to the docs that go with that version.

<strong>
The latest 1.0.x release of this document can be found
[here](http://releases.k8s.io/release-1.0/docs/user-guide/kubectl/kubectl_get.md).

Documentation for other releases can be found at
[releases.k8s.io](http://releases.k8s.io).
</strong>
--

<!-- END STRIP_FOR_RELEASE -->

<!-- END MUNGE: UNVERSIONED_WARNING -->

Expand All @@ -15,7 +43,8 @@ Display one or many resources.
Possible resource types include (case insensitive): pods (po), services (svc),
replicationcontrollers (rc), nodes (no), events (ev), componentstatuses (cs),
limitranges (limits), persistentvolumes (pv), persistentvolumeclaims (pvc),
resourcequotas (quota), namespaces (ns), endpoints (ep), serviceaccounts or secrets.
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
of the --template flag, you can filter the attributes of the fetched resource(s).
Expand Down Expand Up @@ -104,14 +133,7 @@ $ kubectl get rc/web service/frontend pods/web-pod-13je7

* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager

###### Auto generated by spf13/cobra at 2015-09-25 23:39:47.892261275 +0000 UTC



<!-- BEGIN MUNGE: IS_VERSIONED -->
<!-- TAG IS_VERSIONED -->
<!-- END MUNGE: IS_VERSIONED -->

###### Auto generated by spf13/cobra at 2015-11-27 14:20:04.941698058 +0000 UTC

<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_get.md?pixel)]()
Expand Down
37 changes: 29 additions & 8 deletions docs/user-guide/kubectl/kubectl_patch.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
<!-- BEGIN MUNGE: UNVERSIONED_WARNING -->

<!-- BEGIN STRIP_FOR_RELEASE -->

<img src="http://kubernetes.io/img/warning.png" alt="WARNING"
width="25" height="25">
<img src="http://kubernetes.io/img/warning.png" alt="WARNING"
width="25" height="25">
<img src="http://kubernetes.io/img/warning.png" alt="WARNING"
width="25" height="25">
<img src="http://kubernetes.io/img/warning.png" alt="WARNING"
width="25" height="25">
<img src="http://kubernetes.io/img/warning.png" alt="WARNING"
width="25" height="25">

<h2>PLEASE NOTE: This document applies to the HEAD of the source tree</h2>

If you are using a released version of Kubernetes, you should
refer to the docs that go with that version.

<strong>
The latest 1.0.x release of this document can be found
[here](http://releases.k8s.io/release-1.0/docs/user-guide/kubectl/kubectl_patch.md).

Documentation for other releases can be found at
[releases.k8s.io](http://releases.k8s.io).
</strong>
--

<!-- END STRIP_FOR_RELEASE -->

<!-- END MUNGE: UNVERSIONED_WARNING -->

Expand Down Expand Up @@ -74,14 +102,7 @@ kubectl patch pod valid-pod -p '{"spec":{"containers":[{"name":"kubernetes-serve

* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager

###### Auto generated by spf13/cobra at 2015-09-25 23:39:47.893388424 +0000 UTC



<!-- BEGIN MUNGE: IS_VERSIONED -->
<!-- TAG IS_VERSIONED -->
<!-- END MUNGE: IS_VERSIONED -->

###### Auto generated by spf13/cobra at 2015-11-27 14:20:04.942303171 +0000 UTC

<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_patch.md?pixel)]()
Expand Down
2 changes: 1 addition & 1 deletion pkg/kubectl/cmd/annotate.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ If --resource-version is specified, then updates will use this resource version,
Possible resources include (case insensitive): pods (po), services (svc),
replicationcontrollers (rc), nodes (no), events (ev), componentstatuses (cs),
limitranges (limits), persistentvolumes (pv), persistentvolumeclaims (pvc),
resourcequotas (quota) or secrets.`
horizontalpodautoscalers (hpa), resourcequotas (quota) or secrets.`
annotate_example = `# Update pod 'foo' with the annotation 'description' and the value 'my frontend'.
# If the same annotation is set multiple times, only the last value will be applied
$ kubectl annotate pods foo description='my frontend'
Expand Down
1 change: 1 addition & 0 deletions pkg/kubectl/cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ __custom_func() {
* persistentvolumeclaims (aka 'pvc')
* limitranges (aka 'limits')
* resourcequotas (aka 'quota')
* horizontalpodautoscalers (aka 'hpa')
`
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/kubectl/cmd/describe.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ exists, it will output details for every resource that has a name prefixed with
Possible resource types include (case insensitive): pods (po), services (svc),
replicationcontrollers (rc), nodes (no), events (ev), limitranges (limits),
persistentvolumes (pv), persistentvolumeclaims (pvc), resourcequotas (quota),
namespaces (ns), serviceaccounts or secrets.`
namespaces (ns), serviceaccounts, horizontalpodautoscalers (hpa), or secrets.`
describe_example = `# Describe a node
$ kubectl describe nodes kubernetes-minion-emt8.c.myproject.internal
Expand Down
3 changes: 2 additions & 1 deletion pkg/kubectl/cmd/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ const (
Possible resource types include (case insensitive): pods (po), services (svc),
replicationcontrollers (rc), nodes (no), events (ev), componentstatuses (cs),
limitranges (limits), persistentvolumes (pv), persistentvolumeclaims (pvc),
resourcequotas (quota), namespaces (ns), endpoints (ep), serviceaccounts or secrets.
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
of the --template flag, you can filter the attributes of the fetched resource(s).`
Expand Down

0 comments on commit 2d396b0

Please sign in to comment.