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

NAME

9       kubectl apply set-last-applied - Set the last-applied-configuration an‐
10       notation on a live object to match the contents of a file
11
12
13

SYNOPSIS

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

DESCRIPTION

20       Set the latest last-applied-configuration annotations by setting it  to
21       match the contents of a file. This results in the last-applied-configu‐
22       ration being updated as though 'kubectl apply -f ' was run, without up‐
23       dating any other parts of the object.
24
25
26

OPTIONS

28       --allow-missing-template-keys=true       If  true, ignore any errors in
29       templates when a field or map key is missing in the template. Only  ap‐
30       plies to golang and jsonpath output formats.
31
32
33       --create-annotation=false      Will create 'last-applied-configuration'
34       annotations if current objects doesn't have one
35
36
37       --dry-run="none"      Must be "none", "server", or "client". If  client
38       strategy, only print the object that would be sent, without sending it.
39       If server strategy, submit server-side request without  persisting  the
40       resource.
41
42
43       -f,  --filename=[]       Filename, directory, or URL to files that con‐
44       tains the last-applied-configuration annotations
45
46
47       -o, --output=""      Output format. One of: (json, yaml, name,  go-tem‐
48       plate, go-template-file, template, templatefile, jsonpath, jsonpath-as-
49       json, jsonpath-file).
50
51
52       --show-managed-fields=false      If true, keep the  managedFields  when
53       printing objects in JSON or YAML format.
54
55
56       --template=""      Template string or path to template file to use when
57       -o=go-template, -o=go-template-file. The template format is golang tem‐
58       plates [http://golang.org/pkg/text/template/#pkg-overview].
59
60
61

OPTIONS INHERITED FROM PARENT COMMANDS

63       --as=""      Username to impersonate for the operation. User could be a
64       regular user or a service account in a namespace.
65
66
67       --as-group=[]      Group to impersonate for the  operation,  this  flag
68       can be repeated to specify multiple groups.
69
70
71       --as-uid=""      UID to impersonate for the operation.
72
73
74       --azure-container-registry-config=""       Path  to the file containing
75       Azure container registry configuration information.
76
77
78       --cache-dir="/builddir/.kube/cache"      Default cache directory
79
80
81       --certificate-authority=""      Path to a cert file for the certificate
82       authority
83
84
85       --client-certificate=""      Path to a client certificate file for TLS
86
87
88       --client-key=""      Path to a client key file for TLS
89
90
91       --cluster=""      The name of the kubeconfig cluster to use
92
93
94       --context=""      The name of the kubeconfig context to use
95
96
97       --disable-compression=false       If true, opt-out of response compres‐
98       sion for all requests to the server
99
100
101       --insecure-skip-tls-verify=false      If true, the server's certificate
102       will not be checked for validity. This will make your HTTPS connections
103       insecure
104
105
106       --kubeconfig=""      Path to the kubeconfig file to  use  for  CLI  re‐
107       quests.
108
109
110       --match-server-version=false        Require  server  version  to  match
111       client version
112
113
114       -n, --namespace=""      If present, the namespace scope  for  this  CLI
115       request
116
117
118       --password=""      Password for basic authentication to the API server
119
120
121       --profile="none"         Name   of   profile   to   capture.   One   of
122       (none|cpu|heap|goroutine|threadcreate|block|mutex)
123
124
125       --profile-output="profile.pprof"      Name of the  file  to  write  the
126       profile to
127
128
129       --request-timeout="0"       The length of time to wait before giving up
130       on a single server request. Non-zero values  should  contain  a  corre‐
131       sponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't time‐
132       out requests.
133
134
135       -s, --server=""      The address and port of the Kubernetes API server
136
137
138       --tls-server-name=""      Server name to  use  for  server  certificate
139       validation.  If  it  is  not provided, the hostname used to contact the
140       server is used
141
142
143       --token=""      Bearer token for authentication to the API server
144
145
146       --user=""      The name of the kubeconfig user to use
147
148
149       --username=""      Username for basic authentication to the API server
150
151
152       --version=false      Print version information and quit
153
154
155       --warnings-as-errors=false      Treat warnings received from the server
156       as errors and exit with a non-zero exit code
157
158
159

EXAMPLE

161                # Set the last-applied-configuration of a resource to match the contents of a file
162                kubectl apply set-last-applied -f deploy.yaml
163
164                # Execute set-last-applied against each configuration file in a directory
165                kubectl apply set-last-applied -f path/
166
167                # 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
168                kubectl apply set-last-applied -f deploy.yaml --create-annotation=true
169
170
171
172

SEE ALSO

174       kubectl-apply(1),
175
176
177

HISTORY

179       January  2015,  Originally compiled by Eric Paris (eparis at redhat dot
180       com) based on the kubernetes source material, but hopefully  they  have
181       been automatically generated since!
182
183
184
185Manuals                              User            KUBERNETES(1)(kubernetes)
Impressum