Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
f3c4b7f7
Commit
f3c4b7f7
authored
Jul 31, 2015
by
Mike Danese
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #12016 from hurf/shortcut
Better help message for get and describe
parents
6be29336
029ed15b
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
23 additions
and
20 deletions
+23
-20
kubectl-describe.1
docs/man/man1/kubectl-describe.1
+3
-3
kubectl-get.1
docs/man/man1/kubectl-get.1
+1
-1
kubectl_describe.md
docs/user-guide/kubectl/kubectl_describe.md
+4
-4
kubectl_get.md
docs/user-guide/kubectl/kubectl_get.md
+2
-2
cmd.go
pkg/kubectl/cmd/cmd.go
+6
-5
describe.go
pkg/kubectl/cmd/describe.go
+3
-3
get.go
pkg/kubectl/cmd/get.go
+4
-2
No files found.
docs/man/man1/kubectl-describe.1
View file @
f3c4b7f7
...
@@ -28,9 +28,9 @@ exists, it will output details for every resource that has a name prefixed with
...
@@ -28,9 +28,9 @@ exists, it will output details for every resource that has a name prefixed with
.PP
.PP
Possible resources include (case insensitive): pods (po), services (svc),
Possible resources include (case insensitive): pods (po), services (svc),
replicationcontrollers (rc), nodes (no), events (ev),
componentstatuses (c
s),
replicationcontrollers (rc), nodes (no), events (ev),
limitranges (limit
s),
limitranges (limits), persistentvolumes (pv), persistentvolumeclaims (pvc
),
persistentvolumes (pv), persistentvolumeclaims (pvc), resourcequotas (quota
),
resourcequotas (quota
) or secrets.
namespaces (ns
) or secrets.
.SH OPTIONS
.SH OPTIONS
...
...
docs/man/man1/kubectl-get.1
View file @
f3c4b7f7
...
@@ -19,7 +19,7 @@ Display one or many resources.
...
@@ -19,7 +19,7 @@ Display one or many resources.
Possible resources include (case insensitive): pods (po), services (svc),
Possible resources 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) or secrets.
resourcequotas (quota)
, namespaces (ns), endpoints (ep)
or 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
...
...
docs/user-guide/kubectl/kubectl_describe.md
View file @
f3c4b7f7
...
@@ -49,9 +49,9 @@ will first check for an exact match on RESOURCE and NAME_PREFIX. If no such reso
...
@@ -49,9 +49,9 @@ will first check for an exact match on RESOURCE and NAME_PREFIX. If no such reso
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),
replicationcontrollers (rc), nodes (no), events (ev),
componentstatuses (c
s),
replicationcontrollers (rc), nodes (no), events (ev),
limitranges (limit
s),
limitranges (limits), persistentvolumes (pv), persistentvolumeclaims (pvc
),
persistentvolumes (pv), persistentvolumeclaims (pvc), resourcequotas (quota
),
resourcequotas (quota
) or secrets.
namespaces (ns
) or secrets.
```
```
kubectl describe (RESOURCE NAME_PREFIX | RESOURCE/NAME)
kubectl describe (RESOURCE NAME_PREFIX | RESOURCE/NAME)
...
@@ -114,7 +114,7 @@ $ kubectl describe pods frontend
...
@@ -114,7 +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-
15 01:43:24.778753787
+0000 UTC
###### Auto generated by spf13/cobra at 2015-07-
31 07:12:36.111698336
+0000 UTC
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
...
...
docs/user-guide/kubectl/kubectl_get.md
View file @
f3c4b7f7
...
@@ -43,7 +43,7 @@ Display one or many resources.
...
@@ -43,7 +43,7 @@ Display one or many resources.
Possible resources include (case insensitive): pods (po), services (svc),
Possible resources 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) or secrets.
resourcequotas (quota)
, namespaces (ns), endpoints (ep)
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).
...
@@ -125,7 +125,7 @@ $ kubectl get rc/web service/frontend pods/web-pod-13je7
...
@@ -125,7 +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-
15 01:43:24.778535128
+0000 UTC
###### Auto generated by spf13/cobra at 2015-07-
30 08:43:29.371131796
+0000 UTC
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
...
...
pkg/kubectl/cmd/cmd.go
View file @
f3c4b7f7
...
@@ -95,13 +95,14 @@ __custom_func() {
...
@@ -95,13 +95,14 @@ __custom_func() {
* pods (aka 'po')
* pods (aka 'po')
* replicationcontrollers (aka 'rc')
* replicationcontrollers (aka 'rc')
* services (aka 'svc')
* services (aka 'svc')
* nodes (aka 'no')
* events (aka 'ev')
* events (aka 'ev')
* nodes (aka 'no')
* namespaces (aka 'ns')
* secrets
* secrets
*
limits
*
persistentvolumes (aka 'pv')
* persistent
Volumes (aka 'pv
')
* persistent
volumeclaims (aka 'pvc
')
*
persistentVolumeClaims (aka 'pvc
')
*
limitranges (aka 'limits
')
*
quota
*
resourcequotas (aka 'quota')
`
`
)
)
...
...
pkg/kubectl/cmd/describe.go
View file @
f3c4b7f7
...
@@ -43,9 +43,9 @@ will first check for an exact match on RESOURCE and NAME_PREFIX. If no such reso
...
@@ -43,9 +43,9 @@ will first check for an exact match on RESOURCE and NAME_PREFIX. If no such reso
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),
replicationcontrollers (rc), nodes (no), events (ev),
componentstatuses (c
s),
replicationcontrollers (rc), nodes (no), events (ev),
limitranges (limit
s),
limitranges (limits), persistentvolumes (pv), persistentvolumeclaims (pvc
),
persistentvolumes (pv), persistentvolumeclaims (pvc), resourcequotas (quota
),
resourcequotas (quota
) or secrets.`
namespaces (ns
) 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
...
...
pkg/kubectl/cmd/get.go
View file @
f3c4b7f7
...
@@ -35,7 +35,7 @@ const (
...
@@ -35,7 +35,7 @@ const (
Possible resources include (case insensitive): pods (po), services (svc),
Possible resources 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) or secrets.
resourcequotas (quota)
, namespaces (ns), endpoints (ep)
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).`
...
@@ -100,7 +100,9 @@ func RunGet(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string
...
@@ -100,7 +100,9 @@ func RunGet(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string
}
}
if
len
(
args
)
==
0
{
if
len
(
args
)
==
0
{
fmt
.
Fprint
(
out
,
"You must specify the type of resource to get. "
,
valid_resources
)
fmt
.
Fprint
(
out
,
"You must specify the type of resource to get. "
,
valid_resources
,
` * componentstatuses (aka 'cs')
* endpoints (aka 'ep')
`
)
return
cmdutil
.
UsageError
(
cmd
,
"Required resource not specified."
)
return
cmdutil
.
UsageError
(
cmd
,
"Required resource not specified."
)
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment