Managing Kubernetes Resources with Kustomize

  • It is already integrated into the kubectl CLI but the integrated version is normally outdated. Therefore, the standalone binary must be used to benefit from the latest features.
  • It manages variants of resources with overlaying and merging yaml files in a structured way.
  • It provides convenient built-in features to generate common resources like ConfigMaps and Secrets
  • It has built-in transformers to modify resources.
  • It can be extended via a plug-in mechanism.
  • It is possible to dynamically change resources but this is restricted to particular fields of a resource.
  • It only manages the yaml files and does not actively manage the resources in the cluster.

Philosophy

# curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"  | bash
# mv kustomize /usr/local/bin
# kustomize -h
# kubectl kustomize -h

Bases and overlays

  • A base is a directory containing a file called kustomization.yaml, which can enumerate some set of resources with some customizations that will be applied to them. A base should be declared in the resources field of a kustomization file.
  • An overlay is a directory that refers to another kustomization directory as its, or one of its, bases.
foxutech

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store