January 2022
Intermediate to advanced
46 pages
54m
English
Kustomize’s transformers are responsible for modifying and collecting information about resources during the kustomize build or kubectl apply -k processes.
Kustomize provides the transformers shown in Table A-1 as defaults.
| Transformer | Purpose | Example |
|---|---|---|
annotations |
Adds annotations to the metadata/annotations field for all resources. Annotations are also added to spec/template/metadata/annotations for Deployment, ReplicaSet, DaemonSet, StatefulSet, Job, and CronJob resources, and spec/jobTemplate/spec/template/metadata/annotations for CronJob resources. |
See Figure 2-1 |
images |
Updates the image key value in paths that include containers and initcontainers subpaths. Constructs a new image entry via the newName, newTag, and digest fields. The name field should match the image key value in a resource. |
See Figure 2-2 |
labels |
Adds labels to the metadata/labels field for all resources. Per the API requirements, also adds labels to the spec/selector field in all Service resources and to the spec/selector/matchLabels field in all Deployment resources. |
commonLabels: environment: staging |
nameReferences |
Contains a list of name references, which represent all of the possible fields where a type could be used as a reference in other types of resources. Used to note the other places that a particular type of object might be used in a manifest. Needed so that when the name of an ... |
Read now
Unlock full access