mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-10-22 23:21:18 +00:00
Merge pull request #7228 from jlowdermilk/describe-examples
Add examples for kubectl describe, make gendocs less spammy
This commit is contained in:
@@ -29,12 +29,17 @@ import (
|
||||
|
||||
func NewCmdDescribe(f *cmdutil.Factory, out io.Writer) *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "describe RESOURCE ID",
|
||||
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
|
||||
given resource.`,
|
||||
Example: `// Describe a node
|
||||
$ kubectl describe nodes kubernetes-minion-emt8.c.myproject.internal
|
||||
|
||||
// Describe a pod
|
||||
$ kubectl describe pods/nginx`,
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
err := RunDescribe(f, out, cmd, args)
|
||||
cmdutil.CheckErr(err)
|
||||
|
||||
Reference in New Issue
Block a user