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]({{% relref "/book/04-using-functions#chaining-functions-using-the-unix-pipe" %}}).
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