Kpt [NEW]  beta 

manifests.transform and manifests.validate functionality powered by kpt

With Skaffold V2, skaffold now has a new render phase and associated manifests top level config field. Along with these changes, a manifests.transform and a manifests.validate field were added which allows users to specify kpt manifest transformations and validations to be done in the render phase. manifests.transform allows users to create a pipeline of manifest transformations which transform manifests via the specified container. For more information on the manifests.transform functionality see, the docs for kpt mutators here. For a list of kpt supported containers to use in the manifests.transform schema see the list here with the tag mutator. manifests.validate allows users to create a pipeline of manifest validations that run serially, checking the yaml manifests for the specified validation test. For more information on the manifests.validate functionality, see the docs for kpt validators here. For a list of kpt supported containers to use in the manifests.validate schema see the list here with the tag validator.

Conceptually these top level fields remove the necessity of a separate Kptfile allowing more users to adopt the powerful rendering functionality kpt enables. Functionally, these fields are identical to having a seperate Kptfile with the manifests.transform -> pipeline.mutators and manifests.validate -> pipeline.validators.

An example showing how these fields can be used is below. Run skaffold render in a directory with the following files:


apiVersion: skaffold/v3alpha1
kind: Config
  name: guestbook
    - kpt-k8s-pod.yaml
    - name: set-annotations
        - "author:fake-author"
    - name: create-setters
        - "app:guestbook"
    - name: apply-setters
        - "app:guestbook-fake-author"
    - name: kubeval:v0.1


apiVersion: v1
kind: Pod
  name: getting-started
  app: guestbook
  - name: getting-started
    image: nginx

The aboveconfiguration above adds a field with value fake-author, adds a kpt “setter” comment ( # kpt-set: ${app}) to the intermediate yaml, modifies the value at the location of the kpt “setter” field with the provided app value (app: guestbook-fake-author) and then validates that the yaml is valid yaml via kubeval.

Rendering with kpt using a Kptfile

kpt allows Kubernetes developers to customize raw, template-free YAML files for multiple purposes. Skaffold can work with kpt by calling its command-line interface.


To use kpt with Skaffold, add render type kpt to the manifests section of skaffold.yaml.

The kpt configuration accepts a list of paths to folders containing a Kptfile.


The following manifests section instructs Skaffold to render artifacts using kpt. Each entry should point to a folder with a Kptfile.

      - path/to/folder-with-Kptfile
Last modified May 14, 2024: release: v2.12.0 (#9418) (f386e6c)