This is the documentation for version 0.39. For documentation on the latest version of kpt, please see


Initialize an empty package

Init initializes an existing empty directory as an empty kpt package.

init is optional: Any directory containing Kubernetes Resource Configuration may be treated as remote package without the existence of additional packaging metadata.

  • Resource Configuration may be placed anywhere under DIR as *.yaml files.
  • DIR may contain additional non-Resource Configuration files.
  • DIR must be pushed to a git repo or repo subdirectory.

Init will augment an existing local directory with packaging metadata to help with discovery.

Init will:

  • Create a Kptfile with package name and metadata if it doesn’t exist
  • Create a for package documentation if it doesn’t exist.


# writes Kptfile package meta if not found
mkdir my-pkg
kpt pkg init my-pkg --tag \
    --description "my cockroachdb implementation"


kpt pkg init DIR [flags]


  Init fails if DIR does not already exist


  short description of the package. (default "sample description")

  package name.  defaults to the directory base name.

  list of tags for the package.

  link to page with information about the package.

Last modified July 16, 2020: Fix all markdownlint issues (e20b22cd)