KRM KCL is a Kubernetes Resource Model function specification and interpreter that lets you write KCL code to generate, mutate, and validate Kubernetes resources.
The tool addresses the need to programmatically transform Kubernetes manifests using the KCL programming language. It works by accepting KCL scripts through a KCLRun functionConfig, executing them against input resources, and returning modified or validated output. The KCL source can come from local files, version control systems like GitHub, OCI registries, HTTP endpoints, or other sources. Within your scripts, you can read input resources and configuration via the options API, apply transformations like adding labels or injecting sidecars, validate resources against schemas, and return the modified resource list. The tool supports both declarative and imperative usage patterns.
You should consider this tool if you need to apply consistent transformations across Kubernetes manifests in a programmatic way. It suits projects where you want to enforce policies, generate resources from abstract models, or inject common configurations across many resources. The project integrates with multiple Kubernetes tooling ecosystems including Kubectl, Kustomize, Helm, Helmfile, KPT, Crossplane, and Flux, so adoption depends on which tools already exist in your workflow. If you are already using KCL elsewhere in your infrastructure, this provides a natural extension into Kubernetes resource management.
Development activity shows consistent engagement with the codebase through regular updates and refinements to both the core specification and integration points. The project maintains active examples and documentation that demonstrate practical usage patterns. Integration tests are present alongside unit tests, indicating attention to real-world deployment scenarios. The breadth of tool integrations suggests ongoing effort to make the project work within established Kubernetes ecosystems rather than requiring users to adopt entirely new workflows.