Kustomize
No variables. No loops. Patch files multiply for every environment.
Declare a deployment. Get a Deployment, Service, Ingress, Certificate, and HPA — rendered as plain Kubernetes YAML you can read, diff, and commit.
deployment "api" { namespace = "production"
container "api" { image = image("api")
port "8080" "http" { health = "/health" }
env { APP_ENV = var.environment DATABASE_URL = secret("db-credentials", "url") }
resources { cpu = "300m..800m" memory = "256M..1G" } }
service { port "80" "http" {} }
ingress { host = "api.example.com" tls = true }
autoscale { min = 2 max = 10 cpu = 70 }}apiVersion: apps/v1kind: Deploymentmetadata: name: api namespace: productionspec: selector: matchLabels: app: api template: metadata: labels: app: api spec: containers: - name: api image: registry.example.com/api:1.4.2 ports: - containerPort: 8080 name: http livenessProbe: httpGet: path: /health port: http env: - name: APP_ENV value: production - name: DATABASE_URL valueFrom: secretKeyRef: name: db-credentials key: url resources: requests: cpu: 300m memory: 256M limits: cpu: 800m memory: 1G---apiVersion: v1kind: Servicemetadata: name: api namespace: productionspec: selector: app: api ports: - name: http port: 80 targetPort: 80---apiVersion: networking.k8s.io/v1kind: Ingressmetadata: name: api.example.com namespace: production annotations: cert-manager.io/cluster-issuer: letsencrypt-productionspec: tls: - hosts: [api.example.com] secretName: api-example-com-tls rules: - host: api.example.com http: paths: - path: / pathType: Prefix backend: service: name: api port: number: 80---apiVersion: autoscaling/v2kind: HorizontalPodAutoscalermetadata: name: api namespace: productionspec: scaleTargetRef: apiVersion: apps/v1 kind: Deployment name: api minReplicas: 2 maxReplicas: 10 metrics: - type: Resource resource: name: cpu target: type: Utilization averageUtilization: 70for block → a Deployment per tenant, env, or region. No Helm template gymnastics.kdef diff shows exactly what will change.kdef import —namespace my-app turns a live cluster into .kdef files.sealedsecret block. Encrypt with kdef seal, commit safely.Kustomize
No variables. No loops. Patch files multiply for every environment.
Helm
Go templates over YAML. Opaque, error-prone, needs helm template to see what’s going out.
kdef
HCL syntax, typed variables, native loops, renders plain YAML. One block = app + service + ingress + HPA.
# Go installgo install github.com/gsid-nl/kdef/cmd/kdef@latest
# Or grab a binary from releases# https://github.com/gsid-nl/kdef/releasesPlatform packages (.deb, .rpm, .apk) are on the releases page.