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

NAME

6       kubectl  apply  edit-last-applied - Edit latest last-applied-configura‐
7       tion annotations of a resource/object
8
9
10

SYNOPSIS

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

DESCRIPTION

17       Edit the latest  last-applied-configuration  annotations  of  resources
18       from the default editor.
19
20
21       The  edit-last-applied  command  allows  you  to  directly edit any API
22       resource you can retrieve via the command line tools. It will open  the
23       editor  defined  by your KUBE _EDITOR, or EDITOR environment variables,
24       or fall back to 'vi' for Linux or 'notepad' for Windows. You  can  edit
25       multiple  objects, although changes are applied one at a time. The com‐
26       mand accepts filenames as well as command line arguments, although  the
27       files you point to must be previously saved versions of resources.
28
29
30       The default format is YAML. To edit in JSON, specify "-o json".
31
32
33       The  flag --windows-line-endings can be used to force Windows line end‐
34       ings, otherwise the default for your operating system will be used.
35
36
37       In the event an error occurs while updating, a temporary file  will  be
38       created  on  disk that contains your unapplied changes. The most common
39       error when updating a resource is another editor changing the  resource
40       on the server. When this occurs, you will have to apply your changes to
41       the newer version of the resource, or update your temporary saved  copy
42       to include the latest resource version.
43
44
45

OPTIONS

47       --allow-missing-template-keys=true
48           If  true, ignore any errors in templates when a field or map key is
49       missing in the template. Only applies to  golang  and  jsonpath  output
50       formats.
51
52
53       -f, --filename=[]
54           Filename, directory, or URL to files to use to edit the resource
55
56
57       --include-uninitialized=false
58           If  true,  the kubectl command applies to uninitialized objects. If
59       explicitly set to false, this flag overrides other flags that make  the
60       kubectl commands apply to uninitialized objects, e.g., "--all". Objects
61       with empty metadata.initializers are regarded as initialized.
62
63
64       -o, --output=""
65           Output format. One of:  json|yaml|name|template|go-template|go-tem‐
66       plate-file|templatefile|jsonpath|jsonpath-file.
67
68
69       --record=false
70           Record  current  kubectl command in the resource annotation. If set
71       to false, do not record the command. If set to true,  record  the  com‐
72       mand.  If  not  set,  default to updating the existing annotation value
73       only if one already exists.
74
75
76       -R, --recursive=false
77           Process the directory used in -f,  --filename  recursively.  Useful
78       when  you  want  to  manage related manifests organized within the same
79       directory.
80
81
82       --template=""
83           Template string or path to template file  to  use  when  -o=go-tem‐
84       plate,  -o=go-template-file.  The template format is golang templates [
85http://golang.org/pkg/text/template/#pkg-overview⟩].
86
87
88       --windows-line-endings=false
89           Defaults to the line ending native to your platform.
90
91
92

OPTIONS INHERITED FROM PARENT COMMANDS

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

EXAMPLE

355                # Edit the last-applied-configuration annotations by type/name in YAML.
356                kubectl apply edit-last-applied deployment/nginx
357
358                # Edit the last-applied-configuration annotations by file in JSON.
359                kubectl apply edit-last-applied -f deploy.yaml -o json
360
361
362
363

SEE ALSO

365       kubectl-apply(1),
366
367
368

HISTORY

370       January 2015, Originally compiled by Eric Paris (eparis at  redhat  dot
371       com)  based  on the kubernetes source material, but hopefully they have
372       been automatically generated since!
373
374
375
376Eric Paris                  kubernetes User Manuals              KUBERNETES(1)
Impressum