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