Annotations Reference

The following annotations are used to configure kpt features:

AnnotationDescription
config.kubernetes.io/depends-onspecifies one or more resource dependencies
config.kubernetes.io/apply-time-mutationspecifies one or more substitutions to make at apply time using dependencies as input
config.kubernetes.io/local-configspecifies a resource to be skipped when applying

The following annotations are used by kpt internally:

AnnotationDescription
internal.config.kubernetes.io/pathspecifies the resource’s file path when formatted as a ResourceList
internal.config.kubernetes.io/indexspecifies the index of the resource in a file when formatted as a ResourceList
config.kubernetes.io/merge-sourcespecifies the source of the resource during a three way merge

Path annotation details #

The internal.config.kubernetes.io/path annotation specifies the file path of a resource relative to the package directory (the directory containing the Kptfile whose pipeline invoked the function).

When kpt reads resources from disk, it sets this annotation on each resource. When a function creates new resources, it should set this annotation to a path relative to the same package directory. kpt handles adjusting paths to be relative to the root package before writing to disk.

For kpt fn eval DIR, the path is relative to the package directory DIR (the directory passed as the evaluation target).

Last modified July 28, 2026: Address review comments (bff76c2f)