System Serviceskubernetesyamlconfigurationcustomizationkustomization

Kustomize

Kustomize is a standalone tool for customizing Kubernetes YAML configurations without templates, using overlays for environment-specific adjustments. It supports patches, image settings, labels, and annotations for reusable manifests.

Description

Kustomize manages declarative configuration of Kubernetes resources. It allows users to customize YAML manifests through overlays, enabling reuse across different environments without needing templating languages. The tool operates natively with Kubernetes YAML, providing features like applying patches, setting images, and managing common labels and annotations.

The package includes both a standalone binary program and a Go library. The binary offers commands for building kustomizations, editing files, and generating completions. The library provides programmatic access for developers to integrate customization into applications and workflows, supporting resource composition, patching, and variable substitution.

Kustomize is ideal for teams managing complex Kubernetes deployments, ensuring consistent configurations across development, staging, and production environments.

How It Works

Kustomize processes kustomization files (kustomization.yaml) that define bases, patches, and generators. It builds complete YAML configurations by composing resources from directories or URLs, applying strategic merge patches, and substituting variables. The tool uses a declarative approach, merging resources via 2-way or 3-way strategies, and supports alpha features like configuration functions and localization.

Installation

bash
sudo apt install kustomize

Flags

-h, --helphelp for kustomize
--stack-traceprint a stack-trace on error

Examples

Display help and available commands for kustomize
kustomize -h
Build a kustomization target from a directory or URL
kustomize build
Create a new kustomization in the current directory
kustomize create
Edits a kustomization file
kustomize edit
Generate shell completion script
kustomize completion
Commands for reading and writing configuration
kustomize cfg
Commands for running functions against configuration
kustomize fn
Updated 2026-04-16kali.org ↗