The two primary sets of capabilities that are required to enable reuse are:
- The ability to distribute/publish/share, compose, and update groups of configuration artifacts, commonly known as packages.
- The ability to adapt them to your use cases, which we call customization.
In order to facilitate programmatic operations, kpt:
- Relies upon git as the source of truth
- Represents configuration as data, specifically represents Kubernetes object configuration as resources serialized in YAML or JSON format.
For compatibility with other arbitrary formats, kpt supports generating resource configuration data from templates, configuration DSLs, and programs using source functions.
subpackage is a
kpt package which is nested within the directory tree of
Here is an example directory structure of a
kpt package with subpackages
foo ├── Kptfile ├── bar # subpackage │ ├── Kptfile │ ├── baz # subpackage │ │ ├── Kptfile │ │ └── cm.yaml │ └── deploy.yaml └── service.yaml
- Package publishers need a way to pick and choose multiple component packages
which work well together, create a single single
kptpackage using them to ship an out of the box application, maintain the package and abstract the details from package consumers. Alternatively, package consumers may update individual
subpackagesdirectly from the upstream sources.
- Package publishers need a way to create parameter values (e.g. setters) to
be consistent across multiple
subpackagesand make it easy for package consumers to provide them with a single command.
- (Under development) Package consumers need a way to apply a set of
subpackagesin a single command to a live cluster while maintaining the ability to manage them (e.g. add/destroy) independently.
Here are the core principles around
- Each kpt package is an independent building block and should contain resources
(e.g. setter definitions) in its
- Commands performed on a package are not performed on its subpackages unless
--recurse-subpackages(-R)is provided. (only available with cfg commands currently and the default value of
-Rflag might vary for each command)