kubectl-kustomize
Customize Kubernetes configurations
TLDR
Build resources from the current directory
Build resources from a specific directory
Build resources from a remote URL
Build resources and save to a file
Build resources with load restrictor disabled
SYNOPSIS
kubectl-kustomize <DIR|URL> [flags]
PARAMETERS
--enable-alpha-plugins
Enable alpha plugin support. (default true)
--enable-exec
Enable exec plugin support. Deprecated, will be removed in v5.0.0. (default true)
--enable-helm
Process helmCharts defined in kustomization.yaml
--helm-command
Helm binary to use. (default "helm")
--helm-suffix
Suffix appended to generated images. (default ".helm")
--load-restrictor
Restrict file/dir loading: LoadRestrictionsRootOnly|LoadRestrictionsNone. (default "LoadRestrictionsRootOnly")
-h, --help
Display help
--validation
Validation mode: client|server|none. (default "server")
DESCRIPTION
The kubectl-kustomize command is the legacy standalone binary for the Kustomize kubectl plugin, used to assemble Kubernetes manifests from a directory containing a kustomization.yaml file.
Kustomize enables declarative configuration management by applying overlays, patches, and generators to base Kubernetes YAML files without using templates or parameterization. It reads the kustomization.yaml to define resources, patchesStrategicMerge, patchesJson6902, configMapGenerator, secretGenerator, and more, then outputs a consolidated set of YAML manifests suitable for kubectl apply.
Originally developed as a kubectl plugin, it allows customization of deployments across environments (dev, staging, prod) via directory-based structures. Common workflow: place bases in subdirs, define kustomization.yaml with patches, run kubectl-kustomize build . to generate output.
It supports Helm chart integration, remote bases via Git URLs, and validation. Deprecated in favor of built-in kubectl kustomize (since v1.14) and standalone kustomize binary.
CAVEATS
Legacy kubectl plugin; use built-in kubectl kustomize or standalone kustomize. Does not support all modern features like generators in newer versions.
TYPICAL USAGE
kubectl-kustomize build ./overlays/prod | kubectl apply -f -
kubectl-kustomize build https://github.com/example/base.git
HISTORY
Developed by Kubernetes SIG CLI in 2018 as kubectl-kustomize plugin binary for pre-v1.14 kubectl. Integrated into kubectl core in v1.14 (2019). Standalone kustomize evolved separately under Kubernetes org, now at v5+ with CNCF incubation.


