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
d90cd98d
Commit
d90cd98d
authored
Jul 08, 2015
by
Victor Marmol
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #10894 from jlowdermilk/describe-docs
Update kubectl describe help to document prefix matching behavior
parents
db1b8019
229cbd47
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
52 additions
and
18 deletions
+52
-18
kubectl.md
docs/kubectl.md
+2
-2
kubectl_describe.md
docs/kubectl_describe.md
+14
-5
kubectl-describe.1
docs/man/man1/kubectl-describe.1
+14
-3
describe.go
pkg/kubectl/cmd/describe.go
+22
-8
No files found.
docs/kubectl.md
View file @
d90cd98d
...
@@ -49,7 +49,7 @@ kubectl
...
@@ -49,7 +49,7 @@ kubectl
*
[
kubectl config
](
kubectl_config.md
)
- config modifies kubeconfig files
*
[
kubectl config
](
kubectl_config.md
)
- config modifies kubeconfig files
*
[
kubectl create
](
kubectl_create.md
)
- Create a resource by filename or stdin
*
[
kubectl create
](
kubectl_create.md
)
- Create a resource by filename or stdin
*
[
kubectl delete
](
kubectl_delete.md
)
- Delete a resource by filename, stdin, resource and name, or by resources and label selector.
*
[
kubectl delete
](
kubectl_delete.md
)
- Delete a resource by filename, stdin, resource and name, or by resources and label selector.
*
[
kubectl describe
](
kubectl_describe.md
)
- Show details of a specific resource
*
[
kubectl describe
](
kubectl_describe.md
)
- Show details of a specific resource
or group of resources
*
[
kubectl exec
](
kubectl_exec.md
)
- Execute a command in a container.
*
[
kubectl exec
](
kubectl_exec.md
)
- Execute a command in a container.
*
[
kubectl expose
](
kubectl_expose.md
)
- Take a replicated application and expose it as Kubernetes Service
*
[
kubectl expose
](
kubectl_expose.md
)
- Take a replicated application and expose it as Kubernetes Service
*
[
kubectl get
](
kubectl_get.md
)
- Display one or many resources
*
[
kubectl get
](
kubectl_get.md
)
- Display one or many resources
...
@@ -66,6 +66,6 @@ kubectl
...
@@ -66,6 +66,6 @@ kubectl
*
[
kubectl stop
](
kubectl_stop.md
)
- Gracefully shut down a resource by name or filename.
*
[
kubectl stop
](
kubectl_stop.md
)
- 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-07-0
1 07:34:21.247298407
+0000 UTC
###### Auto generated by spf13/cobra at 2015-07-0
7 23:45:47.079572585
+0000 UTC
[

]()
[

]()
docs/kubectl_describe.md
View file @
d90cd98d
## kubectl describe
## kubectl describe
Show details of a specific resource
Show details of a specific resource
or group of resources
### Synopsis
### Synopsis
Show details of a specific resource.
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.
given resource or group of resources.
$ kubectl describe RESOURCE NAME_PREFIX
will first check for an exact match on RESOURCE and NAME_PREFIX. If no such resource
exists, it will output details for every resource that has a name prefixed with NAME_PREFIX
```
```
kubectl describe (RESOURCE NAME | RESOURCE/NAME)
kubectl describe (RESOURCE NAME
_PREFIX
| RESOURCE/NAME)
```
```
### Examples
### Examples
...
@@ -25,6 +30,10 @@ $ kubectl describe pods/nginx
...
@@ -25,6 +30,10 @@ $ kubectl describe pods/nginx
// Describe pods by label name=myLabel
// Describe pods by label name=myLabel
$ kubectl describe po -l name=myLabel
$ kubectl describe po -l name=myLabel
// Describe all pods managed by the 'frontend' replication controller (rc-created pods
// get the name of the rc as a prefix in the pod the name).
$ kubectl describe pods frontend
```
```
### Options
### Options
...
@@ -66,6 +75,6 @@ $ kubectl describe po -l name=myLabel
...
@@ -66,6 +75,6 @@ $ kubectl describe po -l name=myLabel
### SEE ALSO
### SEE ALSO
*
[
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-0
6-12 06:44:05.10579008
5 +0000 UTC
###### Auto generated by spf13/cobra at 2015-0
7-07 23:45:47.07537662
5 +0000 UTC
[

]()
[

]()
docs/man/man1/kubectl-describe.1
View file @
d90cd98d
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
.SH NAME
.SH NAME
.PP
.PP
kubectl describe \- Show details of a specific resource
kubectl describe \- Show details of a specific resource
or group of resources
.SH SYNOPSIS
.SH SYNOPSIS
...
@@ -13,11 +13,18 @@ kubectl describe \- Show details of a specific resource
...
@@ -13,11 +13,18 @@ kubectl describe \- Show details of a specific resource
.SH DESCRIPTION
.SH DESCRIPTION
.PP
.PP
Show details of a specific resource.
Show details of a specific resource
or group of resources
.
.PP
.PP
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.
given resource or group of resources.
.PP
$ kubectl describe RESOURCE NAME\_PREFIX
.PP
will first check for an exact match on RESOURCE and NAME\_PREFIX. If no such resource
exists, it will output details for every resource that has a name prefixed with NAME\_PREFIX
.SH OPTIONS
.SH OPTIONS
...
@@ -142,6 +149,10 @@ $ kubectl describe pods/nginx
...
@@ -142,6 +149,10 @@ $ kubectl describe pods/nginx
// Describe pods by label name=myLabel
// Describe pods by label name=myLabel
$ kubectl describe po \-l name=myLabel
$ kubectl describe po \-l name=myLabel
// Describe all pods managed by the 'frontend' replication controller (rc\-created pods
// get the name of the rc as a prefix in the pod the name).
$ kubectl describe pods frontend
.fi
.fi
.RE
.RE
...
...
pkg/kubectl/cmd/describe.go
View file @
d90cd98d
...
@@ -31,22 +31,36 @@ import (
...
@@ -31,22 +31,36 @@ import (
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime"
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime"
)
)
func
NewCmdDescribe
(
f
*
cmdutil
.
Factory
,
out
io
.
Writer
)
*
cobra
.
Command
{
const
(
cmd
:=
&
cobra
.
Command
{
describe_long
=
`Show details of a specific resource or group of resources.
Use
:
"describe (RESOURCE NAME | RESOURCE/NAME)"
,
Short
:
"Show details of a specific resource"
,
Long
:
`Show details of a specific resource.
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.`
,
given resource or group of resources.
Example
:
`// Describe a node
$ kubectl describe RESOURCE NAME_PREFIX
will first check for an exact match on RESOURCE and NAME_PREFIX. If no such resource
exists, it will output details for every resource that has a name prefixed with NAME_PREFIX`
describe_example
=
`// Describe a node
$ kubectl describe nodes kubernetes-minion-emt8.c.myproject.internal
$ kubectl describe nodes kubernetes-minion-emt8.c.myproject.internal
// Describe a pod
// Describe a pod
$ kubectl describe pods/nginx
$ kubectl describe pods/nginx
// Describe pods by label name=myLabel
// Describe pods by label name=myLabel
$ kubectl describe po -l name=myLabel`
,
$ kubectl describe po -l name=myLabel
// Describe all pods managed by the 'frontend' replication controller (rc-created pods
// get the name of the rc as a prefix in the pod the name).
$ kubectl describe pods frontend`
)
func
NewCmdDescribe
(
f
*
cmdutil
.
Factory
,
out
io
.
Writer
)
*
cobra
.
Command
{
cmd
:=
&
cobra
.
Command
{
Use
:
"describe (RESOURCE NAME_PREFIX | RESOURCE/NAME)"
,
Short
:
"Show details of a specific resource or group of resources"
,
Long
:
describe_long
,
Example
:
describe_example
,
Run
:
func
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
Run
:
func
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
err
:=
RunDescribe
(
f
,
out
,
cmd
,
args
)
err
:=
RunDescribe
(
f
,
out
,
cmd
,
args
)
cmdutil
.
CheckErr
(
err
)
cmdutil
.
CheckErr
(
err
)
...
...
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