1KUBERNETES(1)(kubernetes)                            KUBERNETES(1)(kubernetes)
2
3
4
5Eric Paris Jan 2015
6
7

NAME

9       kubectl top pod - Display resource (CPU/memory) usage of pods
10
11
12

SYNOPSIS

14       kubectl top pod [OPTIONS]
15
16
17

DESCRIPTION

19       Display resource (CPU/memory) usage of pods.
20
21
22       The  'top  pod'  command  allows you to see the resource consumption of
23       pods.
24
25
26       Due to the metrics pipeline delay, they may be unavailable  for  a  few
27       minutes since pod creation.
28
29
30

OPTIONS

32       -A,  --all-namespaces=false       If  present,  list  the requested ob‐
33       ject(s) across all namespaces. Namespace in current context is  ignored
34       even if specified with --namespace.
35
36
37       --containers=false       If present, print usage of containers within a
38       pod.
39
40
41       --field-selector=""      Selector (field query) to filter on,  supports
42       '=',  '==',  and  '!='.(e.g. --field-selector key1=value1,key2=value2).
43       The server only supports a limited number of field queries per type.
44
45
46       --no-headers=false      If present, print output without headers.
47
48
49       -l, --selector=""      Selector (label query) to  filter  on,  supports
50       '=', '==', and '!='.(e.g. -l key1=value1,key2=value2). Matching objects
51       must satisfy all of the specified label constraints.
52
53
54       --sort-by=""      If non-empty, sort pods list using  specified  field.
55       The field can be either 'cpu' or 'memory'.
56
57
58       --sum=false      Print the sum of the resource usage
59
60
61       --use-protocol-buffers=true       Enables using protocol-buffers to ac‐
62       cess Metrics API.
63
64
65

OPTIONS INHERITED FROM PARENT COMMANDS

67       --as=""      Username to impersonate for the operation. User could be a
68       regular user or a service account in a namespace.
69
70
71       --as-group=[]       Group  to  impersonate for the operation, this flag
72       can be repeated to specify multiple groups.
73
74
75       --as-uid=""      UID to impersonate for the operation.
76
77
78       --azure-container-registry-config=""      Path to the  file  containing
79       Azure container registry configuration information.
80
81
82       --cache-dir="/builddir/.kube/cache"      Default cache directory
83
84
85       --certificate-authority=""      Path to a cert file for the certificate
86       authority
87
88
89       --client-certificate=""      Path to a client certificate file for TLS
90
91
92       --client-key=""      Path to a client key file for TLS
93
94
95       --cluster=""      The name of the kubeconfig cluster to use
96
97
98       --context=""      The name of the kubeconfig context to use
99
100
101       --insecure-skip-tls-verify=false      If true, the server's certificate
102       will not be checked for validity. This will make your HTTPS connections
103       insecure
104
105
106       --kubeconfig=""      Path to the kubeconfig file to  use  for  CLI  re‐
107       quests.
108
109
110       --match-server-version=false        Require  server  version  to  match
111       client version
112
113
114       -n, --namespace=""      If present, the namespace scope  for  this  CLI
115       request
116
117
118       --password=""      Password for basic authentication to the API server
119
120
121       --profile="none"         Name   of   profile   to   capture.   One   of
122       (none|cpu|heap|goroutine|threadcreate|block|mutex)
123
124
125       --profile-output="profile.pprof"      Name of the  file  to  write  the
126       profile to
127
128
129       --request-timeout="0"       The length of time to wait before giving up
130       on a single server request. Non-zero values  should  contain  a  corre‐
131       sponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't time‐
132       out requests.
133
134
135       -s, --server=""      The address and port of the Kubernetes API server
136
137
138       --tls-server-name=""      Server name to  use  for  server  certificate
139       validation.  If  it  is  not provided, the hostname used to contact the
140       server is used
141
142
143       --token=""      Bearer token for authentication to the API server
144
145
146       --user=""      The name of the kubeconfig user to use
147
148
149       --username=""      Username for basic authentication to the API server
150
151
152       --version=false      Print version information and quit
153
154
155       --warnings-as-errors=false      Treat warnings received from the server
156       as errors and exit with a non-zero exit code
157
158
159

EXAMPLE

161                # Show metrics for all pods in the default namespace
162                kubectl top pod
163
164                # Show metrics for all pods in the given namespace
165                kubectl top pod --namespace=NAMESPACE
166
167                # Show metrics for a given pod and its containers
168                kubectl top pod POD_NAME --containers
169
170                # Show metrics for the pods defined by label name=myLabel
171                kubectl top pod -l name=myLabel
172
173
174
175

SEE ALSO

177       kubectl-top(1),
178
179
180

HISTORY

182       January  2015,  Originally compiled by Eric Paris (eparis at redhat dot
183       com) based on the kubernetes source material, but hopefully  they  have
184       been automatically generated since!
185
186
187
188Manuals                              User            KUBERNETES(1)(kubernetes)
Impressum