Documents
_index
_index
Type
External
Status
Published
Created
Feb 19, 2026
Updated
Mar 16, 2026
Updated by
Dosu Bot
Source
View

sink reads resources from stdin and writes them to a local directory.
Resources must be in one of the following input formats:

  1. Multi object YAML where resources are separated by ---.

  2. KRM Function Specification wire format where resources are wrapped in an
    object of kind ResourceList.

sink is useful for chaining functions using Unix pipe. For more details, refer
to Chaining functions.

Synopsis#

kpt fn sink DIR [flags]

DIR:
  Path to a local directory to write resources to. The directory must not already exist.

Examples#

# read resources from DIR directory, execute my-fn on them and write the
# output to DIR directory.
$ kpt fn source DIR |
  kpt fn eval - --image ghcr.io/example.com/my-fn |
  kpt fn sink NEW_DIR