1KUBERNETES(1)(kubernetes)                            KUBERNETES(1)(kubernetes)
2
3
4
5Eric Paris Jan 2015
6
7

NAME

9       kubectl  apply  edit-last-applied - Edit latest last-applied-configura‐
10       tion annotations of a resource/object
11
12
13

SYNOPSIS

15       kubectl apply edit-last-applied [OPTIONS]
16
17
18

DESCRIPTION

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

OPTIONS

50       --allow-missing-template-keys=true       If  true, ignore any errors in
51       templates when a field or map key is missing in the template. Only  ap‐
52       plies to golang and jsonpath output formats.
53
54
55       --field-manager="kubectl-client-side-apply"       Name  of  the manager
56       used to track field ownership.
57
58
59       -f, --filename=[]      Filename, directory, or URL to files to  use  to
60       edit the resource
61
62
63       -k,  --kustomize=""      Process the kustomization directory. This flag
64       can't be used together with -f or -R.
65
66
67       -o, --output=""      Output format. One of: (json, yaml, name,  go-tem‐
68       plate, go-template-file, template, templatefile, jsonpath, jsonpath-as-
69       json, jsonpath-file).
70
71
72       --record=false      Record current kubectl command in the resource  an‐
73       notation.  If  set to false, do not record the command. If set to true,
74       record the command. If not set, default to updating the existing  anno‐
75       tation value only if one already exists.
76
77
78       -R, --recursive=false      Process the directory used in -f, --filename
79       recursively. Useful when you want to manage related manifests organized
80       within the same directory.
81
82
83       --show-managed-fields=false       If  true, keep the managedFields when
84       printing objects in JSON or YAML format.
85
86
87       --template=""      Template string or path to template file to use when
88       -o=go-template, -o=go-template-file. The template format is golang tem‐
89       plates [http://golang.org/pkg/text/template/#pkg-overview].
90
91
92       --validate="strict"      Must be one of: strict (or true), warn, ignore
93       (or false).            "true" or "strict" will use a schema to validate
94       the input and fail the request if invalid. It will perform server  side
95       validation  if  ServerSideFieldValidation is enabled on the api-server,
96       but will fall back to less  reliable  client-side  validation  if  not.
97                 "warn"  will  warn  about unknown or duplicate fields without
98       blocking the request if server-side field validation is enabled on  the
99       API  server,  and  behave  as "ignore" otherwise.            "false" or
100       "ignore" will not perform any schema validation, silently dropping  any
101       unknown or duplicate fields.
102
103
104       --windows-line-endings=false      Defaults to the line ending native to
105       your platform.
106
107
108

OPTIONS INHERITED FROM PARENT COMMANDS

110       --as=""      Username to impersonate for the operation. User could be a
111       regular user or a service account in a namespace.
112
113
114       --as-group=[]       Group  to  impersonate for the operation, this flag
115       can be repeated to specify multiple groups.
116
117
118       --as-uid=""      UID to impersonate for the operation.
119
120
121       --azure-container-registry-config=""      Path to the  file  containing
122       Azure container registry configuration information.
123
124
125       --cache-dir="/builddir/.kube/cache"      Default cache directory
126
127
128       --certificate-authority=""      Path to a cert file for the certificate
129       authority
130
131
132       --client-certificate=""      Path to a client certificate file for TLS
133
134
135       --client-key=""      Path to a client key file for TLS
136
137
138       --cluster=""      The name of the kubeconfig cluster to use
139
140
141       --context=""      The name of the kubeconfig context to use
142
143
144       --disable-compression=false      If true, opt-out of response  compres‐
145       sion for all requests to the server
146
147
148       --insecure-skip-tls-verify=false      If true, the server's certificate
149       will not be checked for validity. This will make your HTTPS connections
150       insecure
151
152
153       --kubeconfig=""       Path  to  the  kubeconfig file to use for CLI re‐
154       quests.
155
156
157       --match-server-version=false       Require  server  version  to   match
158       client version
159
160
161       -n,  --namespace=""       If  present, the namespace scope for this CLI
162       request
163
164
165       --password=""      Password for basic authentication to the API server
166
167
168       --profile="none"        Name   of   profile   to   capture.   One    of
169       (none|cpu|heap|goroutine|threadcreate|block|mutex)
170
171
172       --profile-output="profile.pprof"       Name  of  the  file to write the
173       profile to
174
175
176       --request-timeout="0"      The length of time to wait before giving  up
177       on  a  single  server  request. Non-zero values should contain a corre‐
178       sponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't time‐
179       out requests.
180
181
182       -s, --server=""      The address and port of the Kubernetes API server
183
184
185       --tls-server-name=""       Server  name  to  use for server certificate
186       validation. If it is not provided, the hostname  used  to  contact  the
187       server is used
188
189
190       --token=""      Bearer token for authentication to the API server
191
192
193       --user=""      The name of the kubeconfig user to use
194
195
196       --username=""      Username for basic authentication to the API server
197
198
199       --version=false      Print version information and quit
200
201
202       --warnings-as-errors=false      Treat warnings received from the server
203       as errors and exit with a non-zero exit code
204
205
206

EXAMPLE

208                # Edit the last-applied-configuration annotations by type/name in YAML
209                kubectl apply edit-last-applied deployment/nginx
210
211                # Edit the last-applied-configuration annotations by file in JSON
212                kubectl apply edit-last-applied -f deploy.yaml -o json
213
214
215
216

SEE ALSO

218       kubectl-apply(1),
219
220
221

HISTORY

223       January 2015, Originally compiled by Eric Paris (eparis at  redhat  dot
224       com)  based  on the kubernetes source material, but hopefully they have
225       been automatically generated since!
226
227
228
229Manuals                              User            KUBERNETES(1)(kubernetes)
Impressum