kubectl apply set-last-applied

Set the latest last-applied-configuration annotations by setting it to match the contents of a file. This results in the last-applied-configuration being updated as though 'kubectl apply -f<file> ' was run, without updating any other parts of the object

Options

NameDescription
--allow-missing-template-keysIf true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats
-f, --filename <File>Filename, directory, or URL to files identifying the resource
-o, --output <Output Format>Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file
--template <arg>Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview]
--show-manged-fieldsIf true, keep the managedFields when printing objects in JSON or YAML format
--create-annotationWill create 'last-applied-configuration' annotations if current objects doesn't have one