1KUBERNETES(1)                      Jan 2015                      KUBERNETES(1)
2
3
4

NAME

6       kubectl  apply  set-last-applied  -  Set the last-applied-configuration
7       annotation on a live object to match the contents of a file.
8
9
10

SYNOPSIS

12       kubectl apply set-last-applied [OPTIONS]
13
14
15

DESCRIPTION

17       Set the latest last-applied-configuration annotations by setting it  to
18       match the contents of a file. This results in the last-applied-configu‐
19       ration being updated as though 'kubectl apply -f <file>' was run, with‐
20       out updating any other parts of the object.
21
22
23

OPTIONS

25       --allow-missing-template-keys=true
26           If  true, ignore any errors in templates when a field or map key is
27       missing in the template. Only applies to  golang  and  jsonpath  output
28       formats.
29
30
31       --create-annotation=false
32           Will  create  'last-applied-configuration'  annotations  if current
33       objects doesn't have one
34
35
36       --dry-run=false
37           If true, only print the object that would be sent, without  sending
38       it.
39
40
41       -f, --filename=[]
42           Filename,   directory,   or   URL   to   files  that  contains  the
43       last-applied-configuration annotations
44
45
46       -o, --output=""
47           Output   format.   One    of:    json|yaml|name|go-template|go-tem‐
48       plate-file|template|templatefile|jsonpath|jsonpath-file.
49
50
51       --template=""
52           Template  string  or  path  to template file to use when -o=go-tem‐
53       plate, -o=go-template-file. The template format is golang  templates  [
54http://golang.org/pkg/text/template/#pkg-overview⟩].
55
56
57

OPTIONS INHERITED FROM PARENT COMMANDS

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

EXAMPLE

335                # Set the last-applied-configuration of a resource to match the contents of a file.
336                kubectl apply set-last-applied -f deploy.yaml
337
338                # Execute set-last-applied against each configuration file in a directory.
339                kubectl apply set-last-applied -f path/
340
341                # Set the last-applied-configuration of a resource to match the contents of a file, will create the annotation if it does not already exist.
342                kubectl apply set-last-applied -f deploy.yaml --create-annotation=true
343
344
345
346

SEE ALSO

348       kubectl-apply(1),
349
350
351

HISTORY

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