This is the documentation for version 0.39. For documentation on the latest version of kpt, please see kpt.dev.

Annotate

Set an annotation on one or more resources

Annotate sets annotations on resources.

Annotate can be useful when combined with other tools or commands that read annotations to configure their behavior.

Examples

# set an annotation on all Resources: 'key: value'
kpt cfg annotate DIR --kv key=value
# set an annotation on all Service Resources
kpt cfg annotate DIR --kv key=value --kind Service
# set an annotation on the foo Service Resource only
kpt cfg annotate DIR --kv key=value --kind Service --name foo
# set multiple annotations
kpt cfg annotate DIR --kv key1=value1 --kv key2=value2

Synopsis

kpt cfg annotate DIR --kv KEY=VALUE...

Args

DIR:
  Path to a package directory

Flags

--apiVersion
  Only set annotations on resources with this apiVersion.

--kind
  Only set annotations on resources of this kind.

--kv
  The annotation key and value to set.  May be specified multiple times
  to set multiple annotations at once.

--namespace
  Only set annotations on resources in this namespace.

--name
  Only set annotations on resources with this name.

--recurse-subpackages, -R
  Add annotations recursively in all the nested subpackages

Last modified September 10, 2020: docs: Guides For Composite Packages (7716e112)