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
32e6775a
Unverified
Commit
32e6775a
authored
Apr 30, 2018
by
Jordan Liggitt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add version/group usage and example to kubectl get
parent
a8a963c9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
get.go
pkg/kubectl/cmd/get/get.go
+5
-5
No files found.
pkg/kubectl/cmd/get/get.go
View file @
32e6775a
...
@@ -109,6 +109,9 @@ var (
...
@@ -109,6 +109,9 @@ var (
# List a single replication controller with specified NAME in ps output format.
# List a single replication controller with specified NAME in ps output format.
kubectl get replicationcontroller web
kubectl get replicationcontroller web
# List deployments in JSON output format, in the "v1" version of the "apps" API group:
kubectl get deployments.v1.apps -o json
# List a single pod in JSON output format.
# List a single pod in JSON output format.
kubectl get -o json pod web-pod-13je7
kubectl get -o json pod web-pod-13je7
...
@@ -122,10 +125,7 @@ var (
...
@@ -122,10 +125,7 @@ var (
kubectl get rc,services
kubectl get rc,services
# List one or more resources by their type and names.
# List one or more resources by their type and names.
kubectl get rc/web service/frontend pods/web-pod-13je7
kubectl get rc/web service/frontend pods/web-pod-13je7`
))
# List all resources with different types.
kubectl get all`
))
)
)
const
(
const
(
...
@@ -151,7 +151,7 @@ func NewCmdGet(parent string, f cmdutil.Factory, streams genericclioptions.IOStr
...
@@ -151,7 +151,7 @@ func NewCmdGet(parent string, f cmdutil.Factory, streams genericclioptions.IOStr
validArgs
:=
cmdutil
.
ValidArgList
(
f
)
validArgs
:=
cmdutil
.
ValidArgList
(
f
)
cmd
:=
&
cobra
.
Command
{
cmd
:=
&
cobra
.
Command
{
Use
:
"get [(-o|--output=)json|yaml|wide|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=...] (TYPE
[NAME | -l label] | TYPE
/NAME ...) [flags]"
,
Use
:
"get [(-o|--output=)json|yaml|wide|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=...] (TYPE
[.VERSION][.GROUP] [NAME | -l label] | TYPE[.VERSION][.GROUP]
/NAME ...) [flags]"
,
DisableFlagsInUseLine
:
true
,
DisableFlagsInUseLine
:
true
,
Short
:
i18n
.
T
(
"Display one or many resources"
),
Short
:
i18n
.
T
(
"Display one or many resources"
),
Long
:
getLong
+
"
\n\n
"
+
cmdutil
.
SuggestApiResources
(
parent
),
Long
:
getLong
+
"
\n\n
"
+
cmdutil
.
SuggestApiResources
(
parent
),
...
...
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