`sink`
Write resources to a local directory
sink
reads resources from stdin
and writes them to a local directory.
Resources must be in one of the following input formats:
Multi object YAML where resources are separated by
---
.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 gcr.io/example.com/my-fn |
kpt fn sink NEW_DIR
Last modified June 16, 2025: Move docs to hugo (#4215) (2f0d4026)