Skip to content

kcl-lang/examples

Repository files navigation

Examples

FOSSA Status

This repo contains a collection of KCL examples, the documents are at here.

Prerequisite

  • Firstly, download and install KCL, and then prepare a Kubernetes environment.
  • Secondly, learn KCL user guide and tour documents.

Example List

Example Description
Configuration KCL configuration examples, including simple key value pairs and dynamic parameters.
Mutation KCL data mutation examples, including writing KCL code to mutate the replicas field in the KRM
Validation KCL data validation examples, including writing KCL files to validate JSON, YAML, and other data.
Abstraction KCL abstract examples, including using application models to abstract Docker Compose and Kubernetes resources.
Data Integration KCL data integration examples, including integrating JSON and YAML data.
Automation KCL automation examples, including how to use the KCL API to automatically modify and delete configurations.
Package Management KCL package management examples, including how to use kcl package manage tool to manage your KCL project, e.g., add dependencies, publish packages, and more.
Kubernetes KCL Kubernetes examples, including how to use KCL to generate, validate and mutate Kubernetes resources.
CI/CD Integrations KCL CI/CD integration examples, including Github actions, Gitlab CI, etc.
GitOps KCL GitOps examples, including the end-to-end app and infra developing and development automaticly with KCL
App2Kube Generate kube manifests (deployment, service, ingress) from small deploy.yaml files.
Konfig KCL Konfig examples, including a mono repository of the infra and app configuration with KCL
KRM KCL KRM KCL examples, including examples on the KCL package registry including abstraction, mutation and validation
More modules KCL Community Modules

Testing

Run all examples

./test.sh

License

FOSSA Status