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

EXAMPLE

320                # Set the last-applied-configuration of a resource to match the contents of a file.
321                kubectl apply set-last-applied -f deploy.yaml
322
323                # Execute set-last-applied against each configuration file in a directory.
324                kubectl apply set-last-applied -f path/
325
326                # 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.
327                kubectl apply set-last-applied -f deploy.yaml --create-annotation=true
328
329
330
331

SEE ALSO

333       kubectl-apply(1),
334
335
336

HISTORY

338       January  2015,  Originally compiled by Eric Paris (eparis at redhat dot
339       com) based on the kubernetes source material, but hopefully  they  have
340       been automatically generated since!
341
342
343
344Eric Paris                  kubernetes User Manuals              KUBERNETES(1)
Impressum