Back to articles
Kustomize Has a Free API: Template-Free Kubernetes Configuration
NewsDevOps

Kustomize Has a Free API: Template-Free Kubernetes Configuration

via Dev.to DevOpsAlex Spinov

Why Kustomize Kustomize customizes Kubernetes YAML without templates — no Go templating, no Helm charts. Overlay base configs with patches for different environments. Built into kubectl kubectl apply -k overlays/production/ Base Configuration # base/kustomization.yaml resources : - deployment.yaml - service.yaml # base/deployment.yaml apiVersion : apps/v1 kind : Deployment metadata : name : myapp spec : replicas : 1 template : spec : containers : - name : app image : myorg/myapp:latest resources : limits : memory : 256Mi Production Overlay # overlays/production/kustomization.yaml bases : - ../../base replicas : - name : myapp count : 5 images : - name : myorg/myapp newTag : v2.0.0 patchesStrategicMerge : - increase-resources.yaml namePrefix : prod- namespace : production labels : - pairs : environment : production # overlays/production/increase-resources.yaml apiVersion : apps/v1 kind : Deployment metadata : name : myapp spec : template : spec : containers : - name : app resources : li

Continue reading on Dev.to DevOps

Opens in a new tab

Read Full Article
5 views

Related Articles