All Articles

YAML Engineering Is Dying — What Replaces It Will Change DevOps Forever

Why the era of hand-writing thousands of YAML lines is ending. CUE, KCL, Pkl, CDK8s, and general-purpose languages are replacing raw YAML for infrastructure configuration.

DevOpsBoysMar 25, 20266 min read
Share:Tweet

DevOps engineers are not infrastructure engineers. They are YAML engineers. The average platform team maintains tens of thousands of lines of YAML across Kubernetes manifests, Helm values, CI/CD pipelines, and Terraform configs. And it is unsustainable.

YAML was never designed for this. It was designed as a human-readable data serialization format. We turned it into a programming language — complete with templating (Helm), overlays (Kustomize), and validation (OPA). We built an entire ecosystem of tools to compensate for the fact that YAML has no types, no functions, no imports, and no way to express logic.

That era is ending. Here is what comes next.

The Problem Is Not YAML Itself

YAML is fine for small configuration files. The problem is scale. When you have 50 microservices, each with a Deployment, Service, Ingress, HPA, PDB, ConfigMap, and NetworkPolicy, you are maintaining thousands of nearly identical YAML files.

Helm templates help, but they introduce their own complexity — Go templating inside YAML is error-prone, hard to test, and nearly impossible to debug:

yaml
# This is what passes for "logic" in Helm
{{- if and .Values.autoscaling.enabled (not .Values.rollout.enabled) }}
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
  name: {{ include "app.fullname" . }}
  {{- with .Values.autoscaling.annotations }}
  annotations:
    {{- toYaml . | nindent 4 }}
  {{- end }}
{{- end }}

Kustomize is cleaner but limited — it handles overlays well but cannot express complex logic. You still end up duplicating files across environments.

The Alternatives That Are Gaining Traction

CUE Language

CUE (Configure Unify Execute) is a constraint-based configuration language created by Marcel van Lohuizen, who worked on Google's Borg configuration system:

cue
package k8s
 
#Deployment: {
    apiVersion: "apps/v1"
    kind:       "Deployment"
    metadata: name: string
    spec: {
        replicas: int & >=1 & <=100
        selector: matchLabels: app: metadata.name
        template: {
            metadata: labels: app: metadata.name
            spec: containers: [...#Container]
        }
    }
}
 
#Container: {
    name:  string
    image: string
    ports: [...{containerPort: int}]
    resources: {
        requests: {cpu: string, memory: string}
        limits:   {cpu: string, memory: string}
    }
}
 
// Now define actual deployments with type safety
myApp: #Deployment & {
    metadata: name: "my-app"
    spec: {
        replicas: 3
        template: spec: containers: [{
            name:  "app"
            image: "my-app:v1.2.3"
            ports: [{containerPort: 8080}]
            resources: {
                requests: {cpu: "100m", memory: "128Mi"}
                limits:   {cpu: "500m", memory: "512Mi"}
            }
        }]
    }
}

CUE gives you types, constraints, and validation built into the language. If someone sets replicas: -1, it fails at generation time, not at apply time.

KCL (Kusion Configuration Language)

KCL is backed by the CNCF and designed specifically for cloud-native configuration:

python
import manifests
 
schema App:
    name: str
    image: str
    replicas: int = 3
    port: int = 8080
    memory: str = "512Mi"
    cpu: str = "500m"
 
app = App {
    name = "my-service"
    image = "my-service:v2.0"
}
 
# KCL generates the full Kubernetes manifests from this

KCL integrates with Kubernetes, Terraform, and cloud providers. It can validate existing YAML, generate manifests, and enforce policies — all in one tool.

Pkl (Apple's Configuration Language)

Pkl (pronounced "pickle") was open-sourced by Apple in 2024 and has gained significant adoption:

pkl
module k8s.Deployment
 
name: String
replicas: Int(isBetween(1, 100))
image: String
port: Int
 
local labels = Map("app", name)
 
output = new Dynamic {
    apiVersion = "apps/v1"
    kind = "Deployment"
    metadata { ["name"] = name }
    spec {
        ["replicas"] = replicas
        selector { matchLabels = labels }
    }
}

Pkl has built-in type checking, IDE support, and can generate YAML, JSON, and property lists.

CDK8s (TypeScript/Python for Kubernetes)

For teams that want to use general-purpose programming languages:

typescript
import { App, Chart } from 'cdk8s';
import { KubeDeployment, KubeService } from 'cdk8s-plus-29';
 
class MyChart extends Chart {
  constructor(scope: any, id: string) {
    super(scope, id);
 
    const deployment = new KubeDeployment(this, 'deployment', {
      replicas: 3,
      containers: [{
        name: 'app',
        image: 'my-app:v1.0',
        ports: [{ containerPort: 8080 }],
      }],
    });
  }
}
 
const app = new App();
new MyChart(app, 'my-app');
app.synth();

CDK8s generates standard Kubernetes YAML from TypeScript, Python, Java, or Go code. You get full IDE support, type checking, testing, and the ability to share constructs as packages.

Why This Shift Is Happening Now

Three trends are converging:

1. Platform engineering demands abstraction. Internal developer platforms need to expose simplified interfaces — not raw YAML. A developer should say "deploy my app with 3 replicas" not "write a 200-line Deployment manifest." Configuration languages make this abstraction natural.

2. GitOps requires validation before merge. When every change goes through a PR, you need to catch errors before they hit the cluster. YAML has no built-in validation. CUE, KCL, and Pkl can validate at generation time, in CI, before anything touches your infrastructure.

3. AI code generation works better with typed languages. LLMs generate better Kubernetes configs when they work with typed schemas rather than raw YAML. A CUE schema with constraints produces more reliable output than prompting for freeform YAML.

My Predictions

YAML will not disappear. It will become a compilation target. You will write in CUE, KCL, TypeScript, or Python, and generate YAML for Kubernetes to consume. Just like nobody writes assembly by hand anymore, but every program compiles to it.

Helm will be replaced for new projects by 2028. Helm solved a real problem in 2018, but Go templates inside YAML was always a hack. CDK8s and KCL offer a fundamentally better model. Existing Helm charts will continue to be maintained, but new projects will increasingly choose alternatives.

Every platform team will have a "golden path" generator. Instead of giving developers a Helm chart with 300 values, platform teams will provide a simple schema — name, image, port, replicas — and generate everything else automatically.

Configuration testing will become standard. Just like application code has unit tests, infrastructure configuration will have tests that run in CI. CUE and Pkl already support this natively.

The Counterarguments

"YAML is universal." True, and that is why it will remain the output format. But universal does not mean pleasant to work with at scale. JSON is universal too, and nobody wants to hand-write API responses.

"Our team already knows YAML." Your team also knows how to write assembly. The question is whether that is the best use of their time. Learning CUE or KCL takes days, not months.

"Helm has a massive ecosystem." It does, and that ecosystem is not going away overnight. But the trend is clear — the CNCF is investing in KCL, Apple open-sourced Pkl, and CDK8s adoption is growing steadily.

What You Should Do Today

  1. Evaluate CUE or KCL for one project — pick a service with repetitive manifests and rewrite it
  2. Add YAML validation to CI — even without switching languages, tools like kubeconform and datree catch errors before apply
  3. Abstract your platform — if developers are writing raw Kubernetes YAML, you are leaking infrastructure complexity
  4. Watch the CNCF KCL project — it is rapidly maturing and has strong backing

The engineers who understand configuration languages will be the ones building the next generation of developer platforms. If you want to stay ahead of this curve, the platform engineering and Kubernetes courses at KodeKloud are an excellent foundation.

The Bottom Line

We built an incredible ecosystem around YAML, but we outgrew it. The next chapter of infrastructure management will be defined by typed, testable, composable configuration languages that generate YAML as an output format.

The YAML is not going away. But the era of hand-writing it at scale is ending. And honestly, good riddance.

For hands-on practice with Kubernetes, Helm, and emerging configuration tools, check out KodeKloud's learning paths. And if you need a cluster to experiment with, DigitalOcean's managed Kubernetes is a solid, affordable option.

Newsletter

Stay ahead of the curve

Get the latest DevOps, Kubernetes, AWS, and AI/ML guides delivered straight to your inbox. No spam — just practical engineering content.

Related Articles

Comments