91 lines
2.2 KiB
Groff
91 lines
2.2 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
|
|
// List all pods in ps output format.
|
|
$ kubectl get pods
|
|
|
|
// List a single replication controller with specified ID in ps output format.
|
|
$ kubectl get replicationController 1234\-56\-7890\-234234\-456456
|
|
|
|
// List a single pod in JSON output format.
|
|
$ kubectl get \-o json pod 1234\-56\-7890\-234234\-456456
|
|
|
|
// Return only the status value of the specified pod.
|
|
$ kubectl get \-o template pod 1234\-56\-7890\-234234\-456456 \-\-template=\{\{.currentState.status\}\}
|
|
|
|
// List all replication controllers and services together in ps output format.
|
|
$ kubectl get rc,services
|
|
|
|
.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. The template format is golang templates [
|
|
\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]]
|
|
|
|
.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!
|