From cac9e88c11278ed5a0128f237d04bf7785b959b0 Mon Sep 17 00:00:00 2001 From: Jerzy Szczepkowski Date: Thu, 19 Nov 2015 15:16:26 +0100 Subject: [PATCH] Updated kubectl help messages. Updated kubectl help messages: added info about hpa. Fixes #17357. --- docs/man/man1/kubectl-annotate.1 | 2 +- docs/man/man1/kubectl-describe.1 | 3 ++- docs/man/man1/kubectl-explain.1 | 3 ++- docs/man/man1/kubectl-get.1 | 3 ++- docs/user-guide/kubectl/kubectl_annotate.md | 4 ++-- docs/user-guide/kubectl/kubectl_describe.md | 5 +++-- docs/user-guide/kubectl/kubectl_explain.md | 5 +++-- docs/user-guide/kubectl/kubectl_get.md | 5 +++-- pkg/kubectl/cmd/annotate.go | 2 +- pkg/kubectl/cmd/cmd.go | 1 + pkg/kubectl/cmd/describe.go | 3 ++- pkg/kubectl/cmd/explain.go | 3 ++- pkg/kubectl/cmd/get.go | 3 ++- 13 files changed, 26 insertions(+), 16 deletions(-) diff --git a/docs/man/man1/kubectl-annotate.1 b/docs/man/man1/kubectl-annotate.1 index 7568a5ba82e..a0dac664a67 100644 --- a/docs/man/man1/kubectl-annotate.1 +++ b/docs/man/man1/kubectl-annotate.1 @@ -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 diff --git a/docs/man/man1/kubectl-describe.1 b/docs/man/man1/kubectl-describe.1 index 72da6e21d77..9dca616f3e7 100644 --- a/docs/man/man1/kubectl-describe.1 +++ b/docs/man/man1/kubectl-describe.1 @@ -30,7 +30,8 @@ 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, endpoints (ep) or secrets. +namespaces (ns), serviceaccounts, horizontalpodautoscalers (hpa), +endpoints (ep) or secrets. .SH OPTIONS diff --git a/docs/man/man1/kubectl-explain.1 b/docs/man/man1/kubectl-explain.1 index 4a477041fa2..e02d67fcade 100644 --- a/docs/man/man1/kubectl-explain.1 +++ b/docs/man/man1/kubectl-explain.1 @@ -19,7 +19,8 @@ Documentation of resources. Possible resource types include: pods (po), services (svc), replicationcontrollers (rc), nodes (no), events (ev), componentstatuses (cs), limitranges (limits), persistentvolumes (pv), persistentvolumeclaims (pvc), -resourcequotas (quota), namespaces (ns) or endpoints (ep). +resourcequotas (quota), namespaces (ns), horizontalpodautoscalers (hpa) +or endpoints (ep). .SH OPTIONS diff --git a/docs/man/man1/kubectl-get.1 b/docs/man/man1/kubectl-get.1 index 348281723ad..3da879da0e2 100644 --- a/docs/man/man1/kubectl-get.1 +++ b/docs/man/man1/kubectl-get.1 @@ -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 diff --git a/docs/user-guide/kubectl/kubectl_annotate.md b/docs/user-guide/kubectl/kubectl_annotate.md index 758abfadb42..26e92a4e429 100644 --- a/docs/user-guide/kubectl/kubectl_annotate.md +++ b/docs/user-guide/kubectl/kubectl_annotate.md @@ -48,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] @@ -125,7 +125,7 @@ $ kubectl annotate pods foo description- * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra on 14-Nov-2015 +###### Auto generated by spf13/cobra on 19-Nov-2015 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_annotate.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_describe.md b/docs/user-guide/kubectl/kubectl_describe.md index f4c07204518..de84cd503c8 100644 --- a/docs/user-guide/kubectl/kubectl_describe.md +++ b/docs/user-guide/kubectl/kubectl_describe.md @@ -51,7 +51,8 @@ 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, endpoints (ep) or secrets. +namespaces (ns), serviceaccounts, horizontalpodautoscalers (hpa), +endpoints (ep) or secrets. ``` kubectl describe (-f FILENAME | TYPE [NAME_PREFIX | -l label] | TYPE/NAME) @@ -119,7 +120,7 @@ $ kubectl describe pods frontend * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra on 5-Nov-2015 +###### Auto generated by spf13/cobra on 19-Nov-2015 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_describe.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_explain.md b/docs/user-guide/kubectl/kubectl_explain.md index 176f0e93eae..d980e30842b 100644 --- a/docs/user-guide/kubectl/kubectl_explain.md +++ b/docs/user-guide/kubectl/kubectl_explain.md @@ -43,7 +43,8 @@ Documentation of resources. Possible resource types include: pods (po), services (svc), replicationcontrollers (rc), nodes (no), events (ev), componentstatuses (cs), limitranges (limits), persistentvolumes (pv), persistentvolumeclaims (pvc), -resourcequotas (quota), namespaces (ns) or endpoints (ep). +resourcequotas (quota), namespaces (ns), horizontalpodautoscalers (hpa) +or endpoints (ep). ``` kubectl explain RESOURCE @@ -97,7 +98,7 @@ $ kubectl explain pods.spec.containers * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra at 2015-09-25 11:07:41.758531939 +0000 UTC +###### Auto generated by spf13/cobra on 19-Nov-2015 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_explain.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_get.md b/docs/user-guide/kubectl/kubectl_get.md index b4cbce30769..fda39f6ec4b 100644 --- a/docs/user-guide/kubectl/kubectl_get.md +++ b/docs/user-guide/kubectl/kubectl_get.md @@ -43,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). @@ -129,7 +130,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 on 4-Nov-2015 +###### Auto generated by spf13/cobra on 19-Nov-2015 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_get.md?pixel)]() diff --git a/pkg/kubectl/cmd/annotate.go b/pkg/kubectl/cmd/annotate.go index 51e244e5ba1..ddcf8fd0ddb 100644 --- a/pkg/kubectl/cmd/annotate.go +++ b/pkg/kubectl/cmd/annotate.go @@ -60,7 +60,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' diff --git a/pkg/kubectl/cmd/cmd.go b/pkg/kubectl/cmd/cmd.go index d151ea31b57..f9903b99a55 100644 --- a/pkg/kubectl/cmd/cmd.go +++ b/pkg/kubectl/cmd/cmd.go @@ -125,6 +125,7 @@ __custom_func() { * componentstatuses (aka 'cs') * endpoints (aka 'ep') * quota + * horizontalpodautoscalers (aka 'hpa') ` ) diff --git a/pkg/kubectl/cmd/describe.go b/pkg/kubectl/cmd/describe.go index c0d9afc1346..7fa4dedf196 100644 --- a/pkg/kubectl/cmd/describe.go +++ b/pkg/kubectl/cmd/describe.go @@ -52,7 +52,8 @@ 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, endpoints (ep) or secrets.` +namespaces (ns), serviceaccounts, horizontalpodautoscalers (hpa), +endpoints (ep) or secrets.` describe_example = `# Describe a node $ kubectl describe nodes kubernetes-minion-emt8.c.myproject.internal diff --git a/pkg/kubectl/cmd/explain.go b/pkg/kubectl/cmd/explain.go index 0e13beaf509..4b4a0a8c0dd 100644 --- a/pkg/kubectl/cmd/explain.go +++ b/pkg/kubectl/cmd/explain.go @@ -38,7 +38,8 @@ $ kubectl explain pods.spec.containers` Possible resource types include: pods (po), services (svc), replicationcontrollers (rc), nodes (no), events (ev), componentstatuses (cs), limitranges (limits), persistentvolumes (pv), persistentvolumeclaims (pvc), -resourcequotas (quota), namespaces (ns) or endpoints (ep).` +resourcequotas (quota), namespaces (ns), horizontalpodautoscalers (hpa) +or endpoints (ep).` ) // NewCmdExplain returns a cobra command for swagger docs diff --git a/pkg/kubectl/cmd/get.go b/pkg/kubectl/cmd/get.go index d036371e719..112bf945a2e 100644 --- a/pkg/kubectl/cmd/get.go +++ b/pkg/kubectl/cmd/get.go @@ -41,7 +41,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).`