kustomize

Build the current working directory

  1. kubectl kustomize

Build some shared configuration directory

  1. kubectl kustomize /home/config/production

Build from github

  1. kubectl kustomize https://github.com/kubernetes-sigs/kustomize.git/examples/helloWorld?ref=v1.0.6

Build a set of KRM resources using a ‘kustomization.yaml’ file. The DIR argument must be a path to a directory containing ‘kustomization.yaml’, or a git repository URL with a path suffix specifying same with respect to the repository root. If DIR is omitted, ‘.’ is assumed.

Usage

$ kubectl kustomize DIR

Flags

NameShorthandDefaultUsage
as-current-userfalseuse the uid and gid of the command executor to run the function in the container
enable-alpha-pluginsfalseenable kustomize plugins
enable-helmfalseEnable use of the Helm chart inflator generator.
enable-managedby-labelfalseenable adding app.kubernetes.io/managed-by
enve[]a list of environment variables to be used by functions
helm-commandhelmhelm command (path to executable)
load-restrictorLoadRestrictionsRootOnlyif set to ‘LoadRestrictionsNone’, local kustomizations may load files from outside their root. This does, however, break the relocatability of the kustomization.
mount[]a list of storage options read from the filesystem
networkfalseenable network access for functions that declare it
network-namebridgethe docker network to run the container in
outputoIf specified, write output to this path.
reorderlegacyReorder the resources just before output. Use ‘legacy’ to apply a legacy reordering (Namespaces first, Webhooks last, etc). Use ‘none’ to suppress a final reordering.