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

NAME

6       kubectl apply edit-last-applied - Edit latest
7       last-applied-configuration 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, or
24       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
26       command accepts filenames as well as command line arguments, although
27       the 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
34       endings, 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       -k, --kustomize=""
58           Process the kustomization directory. This flag can't be used
59       together with -f or -R.
60
61
62       -o, --output=""
63           Output format. One of:
64       json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.
65
66
67       --record=false
68           Record current kubectl command in the resource annotation. If set
69       to false, do not record the command. If set to true, record the
70       command. If not set, default to updating the existing annotation value
71       only if one already exists.
72
73
74       -R, --recursive=false
75           Process the directory used in -f, --filename recursively. Useful
76       when you want to manage related manifests organized within the same
77       directory.
78
79
80       --template=""
81           Template string or path to template file to use when
82       -o=go-template, -o=go-template-file. The template format is golang
83       templates [ ⟨http://golang.org/pkg/text/template/#pkg-overview⟩].
84
85
86       --windows-line-endings=false
87           Defaults to the line ending native to your platform.
88
89
90

OPTIONS INHERITED FROM PARENT COMMANDS

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

EXAMPLE

394                # Edit the last-applied-configuration annotations by type/name in YAML.
395                kubectl apply edit-last-applied deployment/nginx
396
397                # Edit the last-applied-configuration annotations by file in JSON.
398                kubectl apply edit-last-applied -f deploy.yaml -o json
399
400
401
402

SEE ALSO

404       kubectl-apply(1),
405
406
407

HISTORY

409       January 2015, Originally compiled by Eric Paris (eparis at redhat dot
410       com) based on the kubernetes source material, but hopefully they have
411       been automatically generated since!
412
413
414
415Eric Paris                  kubernetes User Manuals              KUBERNETES(1)
Impressum