Introduction to Kapitan Generators
Kapitan Generators are a quick way to generate files based on a specific instruction.
In the example, we will explore how to generate Kubernetes manifests using the Kapitan Kubernetes Generator.
In this module you will learn:
- Hot to create a new Kapitan target
- How to generate a Deployment resource
- How to expose ports using a Service resource
- How to add a ConfigMap
- How to use
gitto keep track of your changes
ATTENTION: KATACODA BUG
A bug in katacoda prevents this scenario from working correctly if files are open in the editor other than the one being pasted into.
I have reported the bug to Katacoda and waiting on their support.
Introduction to Kapitan Kubernetes Generators
Clone the example repository Let's get started by cloning the Kapitan Reference repository
git clone https://github.com/kapicorp/kapitan-reference.git kapitan-reference && cd kapitan-reference
./kapitan --version to check what version you are running. Check on https://kapitan.dev to see if a new version has been released and to find more documentation.
./kapitan compile to compile all the other examples already present in this repository.
As you can see, this reference repository comes already pre-installed with a good amount of examples, which you can see being compiled by Kapitan
Compiled global (1.68s)
Compiled mysql (3.01s)
Compiled sock-shop (5.41s)
Compiled prod-sockshop (4.00s)
Compiled dev-sockshop (3.52s)