Skip to content

Setup

Developing new generators is straightforward with the kgenlib library. In this tutorial, you'll learn to create a generator class for the Kubernetes CRD object, the Fish CRD.

Setup the Environment

  1. Clone the Kapitan Reference repository:

    git clone git@github.com:kapicorp/kapitan-reference.git
    cd kapitan-reference
    

  2. Verify the setup by compiling:

    ./kapitan compile
    

Configuration

Kapitan should iterate over the following configuration to produce Kubernetes resources:

parameters:
  kapicorp:
    simple_fish_generator:
      cod:
        family: Gadidae
      blue_shark:
        name: blue-shark
        family: Carcharhinidae

Note: This configuration is available in targets/examples/tutorial.yml.