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

NAME

9       kubectl  apply  view-last-applied - View latest last-applied-configura‐
10       tion annotations of a resource/object
11
12
13

SYNOPSIS

15       kubectl apply view-last-applied [OPTIONS]
16
17
18

DESCRIPTION

20       View the latest last-applied-configuration annotations by type/name  or
21       file.
22
23
24       The  default  output  will be printed to stdout in YAML format. One can
25       use -o option to change output format.
26
27
28

OPTIONS

30       --all=false      Select all resources in the namespace of the specified
31       resource types
32
33
34       -f,  --filename=[]       Filename, directory, or URL to files that con‐
35       tains the last-applied-configuration annotations
36
37
38       -k, --kustomize=""      Process the kustomization directory. This  flag
39       can't be used together with -f or -R.
40
41
42       -o, --output="yaml"      Output format. Must be one of yaml|json
43
44
45       -R, --recursive=false      Process the directory used in -f, --filename
46       recursively. Useful when you want to manage related manifests organized
47       within the same directory.
48
49
50       -l,  --selector=""       Selector  (label query) to filter on, supports
51       '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)
52
53
54

OPTIONS INHERITED FROM PARENT COMMANDS

56       --add-dir-header=false      If true, adds the  file  directory  to  the
57       header of the log messages
58
59
60       --alsologtostderr=false      log to standard error as well as files
61
62
63       --application-metrics-count-limit=100       Max  number  of application
64       metrics to store (per container)
65
66
67       --as=""      Username to impersonate for the operation
68
69
70       --as-group=[]      Group to impersonate for the  operation,  this  flag
71       can be repeated to specify multiple groups.
72
73
74       --azure-container-registry-config=""       Path  to the file containing
75       Azure container registry configuration information.
76
77
78       --boot-id-file="/proc/sys/kernel/random/boot_id"        Comma-separated
79       list of files to check for boot-id. Use the first one that exists.
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       --cloud-provider-gce-l7lb-src-cidrs=130.211.0.0/22,35.191.0.0/16
96            CIDRs  opened  in  GCE  firewall  for  L7 LB traffic proxy  health
97       checks
98
99
100       --cloud-provider-gce-lb-src-cidrs=130.211.0.0/22,209.85.152.0/22,209.85.204.0/22,35.191.0.0/16
101            CIDRs  opened  in  GCE  firewall  for  L4 LB traffic proxy  health
102       checks
103
104
105       --cluster=""      The name of the kubeconfig cluster to use
106
107
108       --container-hints="/etc/cadvisor/container_hints.json"      location of
109       the container hints file
110
111
112       --containerd="/run/containerd/containerd.sock"      containerd endpoint
113
114
115       --containerd-namespace="k8s.io"      containerd namespace
116
117
118       --context=""      The name of the kubeconfig context to use
119
120
121       --default-not-ready-toleration-seconds=300       Indicates  the tolera‐
122       tionSeconds of the toleration for notReady:NoExecute that is  added  by
123       default to every pod that does not already have such a toleration.
124
125
126       --default-unreachable-toleration-seconds=300      Indicates the tolera‐
127       tionSeconds of the toleration for unreachable:NoExecute that  is  added
128       by default to every pod that does not already have such a toleration.
129
130
131       --disable-root-cgroup-stats=false       Disable  collecting root Cgroup
132       stats
133
134
135       --docker="unix:///var/run/docker.sock"      docker endpoint
136
137
138       --docker-env-metadata-whitelist=""      a comma-separated list of envi‐
139       ronment  variable  keys  matched with specified prefix that needs to be
140       collected for docker containers
141
142
143       --docker-only=false      Only report docker containers in  addition  to
144       root stats
145
146
147       --docker-root="/var/lib/docker"       DEPRECATED:  docker  root is read
148       from docker info (this is a fallback, default: /var/lib/docker)
149
150
151       --docker-tls=false      use TLS to connect to docker
152
153
154       --docker-tls-ca="ca.pem"      path to trusted CA
155
156
157       --docker-tls-cert="cert.pem"      path to client certificate
158
159
160       --docker-tls-key="key.pem"      path to private key
161
162
163       --enable-load-reader=false      Whether to enable cpu load reader
164
165
166       --event-storage-age-limit="default=0"      Max length of time for which
167       to store events (per type). Value is a comma separated list of key val‐
168       ues, where the keys are event types (e.g.: creation, oom) or  "default"
169       and  the  value  is a duration. Default is applied to all non-specified
170       event types
171
172
173       --event-storage-event-limit="default=0"      Max number  of  events  to
174       store  (per type). Value is a comma separated list of key values, where
175       the keys are event types (e.g.: creation, oom)  or  "default"  and  the
176       value  is  an  integer.  Default  is applied to all non-specified event
177       types
178
179
180       --global-housekeeping-interval=1m0s      Interval between global house‐
181       keepings
182
183
184       --housekeeping-interval=10s       Interval between container housekeep‐
185       ings
186
187
188       --insecure-skip-tls-verify=false      If true, the server's certificate
189       will not be checked for validity. This will make your HTTPS connections
190       insecure
191
192
193       --kubeconfig=""      Path to the kubeconfig file to  use  for  CLI  re‐
194       quests.
195
196
197       --log-backtrace-at=:0       when logging hits line file:N, emit a stack
198       trace
199
200
201       --log-cadvisor-usage=false      Whether to log the usage of the  cAdvi‐
202       sor container
203
204
205       --log-dir=""      If non-empty, write log files in this directory
206
207
208       --log-file=""      If non-empty, use this log file
209
210
211       --log-file-max-size=1800       Defines  the maximum size a log file can
212       grow to. Unit is megabytes. If the value is 0, the maximum file size is
213       unlimited.
214
215
216       --log-flush-frequency=5s       Maximum  number  of  seconds between log
217       flushes
218
219
220       --logtostderr=true      log to standard error instead of files
221
222
223       --machine-id-file="/etc/machine-id,/var/lib/dbus/machine-id"
224            Comma-separated  list  of  files  to check for machine-id. Use the
225       first one that exists.
226
227
228       --match-server-version=false       Require  server  version  to   match
229       client version
230
231
232       -n,  --namespace=""       If  present, the namespace scope for this CLI
233       request
234
235
236       --one-output=false      If true, only write logs to their native sever‐
237       ity level (vs also writing to each lower severity level
238
239
240       --password=""      Password for basic authentication to the API server
241
242
243       --profile="none"         Name   of   profile   to   capture.   One   of
244       (none|cpu|heap|goroutine|threadcreate|block|mutex)
245
246
247       --profile-output="profile.pprof"      Name of the  file  to  write  the
248       profile to
249
250
251       --referenced-reset-interval=0       Reset interval for referenced bytes
252       (container_referenced_bytes metric), number of measurement cycles after
253       which  referenced  bytes  are cleared, if set to 0 referenced bytes are
254       never cleared (default: 0)
255
256
257       --request-timeout="0"      The length of time to wait before giving  up
258       on  a  single  server  request. Non-zero values should contain a corre‐
259       sponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't time‐
260       out requests.
261
262
263       -s, --server=""      The address and port of the Kubernetes API server
264
265
266       --skip-headers=false       If  true,  avoid  header prefixes in the log
267       messages
268
269
270       --skip-log-headers=false      If true, avoid headers when  opening  log
271       files
272
273
274       --stderrthreshold=2      logs at or above this threshold go to stderr
275
276
277       --storage-driver-buffer-duration=1m0s      Writes in the storage driver
278       will be buffered for this duration, and committed  to  the  non  memory
279       backends as a single transaction
280
281
282       --storage-driver-db="cadvisor"      database name
283
284
285       --storage-driver-host="localhost:8086"      database host:port
286
287
288       --storage-driver-password="root"      database password
289
290
291       --storage-driver-secure=false      use secure connection with database
292
293
294       --storage-driver-table="stats"      table name
295
296
297       --storage-driver-user="root"      database username
298
299
300       --tls-server-name=""       Server  name  to  use for server certificate
301       validation. If it is not provided, the hostname  used  to  contact  the
302       server is used
303
304
305       --token=""      Bearer token for authentication to the API server
306
307
308       --update-machine-info-interval=5m0s       Interval between machine info
309       updates.
310
311
312       --user=""      The name of the kubeconfig user to use
313
314
315       --username=""      Username for basic authentication to the API server
316
317
318       -v, --v=0      number for the log level verbosity
319
320
321       --version=false      Print version information and quit
322
323
324       --vmodule=       comma-separated  list  of   pattern=N   settings   for
325       file-filtered logging
326
327
328       --warnings-as-errors=false      Treat warnings received from the server
329       as errors and exit with a non-zero exit code
330
331
332

EXAMPLE

334                # View the last-applied-configuration annotations by type/name in YAML.
335                kubectl apply view-last-applied deployment/nginx
336
337                # View the last-applied-configuration annotations by file in JSON
338                kubectl apply view-last-applied -f deploy.yaml -o json
339
340
341
342

SEE ALSO

344       kubectl-apply(1),
345
346
347

HISTORY

349       January 2015, Originally compiled by Eric Paris (eparis at  redhat  dot
350       com)  based  on the kubernetes source material, but hopefully they have
351       been automatically generated since!
352
353
354
355Manuals                              User            KUBERNETES(1)(kubernetes)
Impressum