Files
kubernetes/docs/man/man1/kubectl-get.1
Eric Paris 9e9fb9457f automatically generate man pages for kubectl
generate man pages for kubectl using the cobra.Command information.
This will directly create files in (by default) docs/man/man1/ called
kubectl*.1.  Each child verb/cobra command will gets its own man page.
2015-02-12 19:08:52 -05:00

90 lines
2.1 KiB
Groff

.TH "KUBERNETES" "1" " kubernetes User Manuals" "Eric Paris" "Jan 2015" ""
.SH NAME
.PP
kubectl get \- Display one or many resources
.SH SYNOPSIS
.PP
\fBkubectl get\fP [OPTIONS]
.SH DESCRIPTION
.PP
Display one or many resources.
.PP
Possible resources include pods (po), replication controllers (rc), services
(se), minions (mi), or events (ev).
.PP
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).
.PP
Examples:
.PP
.RS
.nf
$ kubectl get pods
// List all pods in ps output format.
$ kubectl get replicationController 1234\-56\-7890\-234234\-456456
// List a single replication controller with specified ID in ps output format.
$ kubectl get \-o json pod 1234\-56\-7890\-234234\-456456
// List a single pod in JSON output format.
$ kubectl get \-o template pod 1234\-56\-7890\-234234\-456456 \-\-template=\{\{.currentState.status\}\}
// Return only the status value of the specified pod.
$ kubectl get rc,services
// List all replication controllers and services together in ps output format.
.fi
.RE
.SH OPTIONS
.PP
\fB\-\-no\-headers\fP=false
When using the default output, don't print headers.
.PP
\fB\-o\fP, \fB\-\-output\fP=""
Output format. One of: json|yaml|template|templatefile.
.PP
\fB\-\-output\-version\fP=""
Output the formatted object with the given version (default api\-version).
.PP
\fB\-l\fP, \fB\-\-selector\fP=""
Selector (label query) to filter on
.PP
\fB\-t\fP, \fB\-\-template\fP=""
Template string or path to template file to use when \-o=template or \-o=templatefile.
.PP
\fB\-w\fP, \fB\-\-watch\fP=false
After listing/getting the requested object, watch for changes.
.PP
\fB\-\-watch\-only\fP=false
Watch for changes to the requested object(s), without listing/getting first.
.SH SEE ALSO
.PP
\fBkubectl(1)\fP,
.SH HISTORY
.PP
January 2015, Originally compiled by Eric Paris (eparis at redhat dot com) based on the kubernetes source material, but hopefully they have been automatically generated since!