TECH BASICS

Getting started with Kustomize

Arun Kumar Singh
Nerd For Tech
6 min readFeb 9, 2021

--

When you deploy components or systems in Kubernetes, you have to work with YAML files. You create a set of few Kubernetes object files and deploy it via running the kubectl create or apply command. This approach is pretty okay when you are dealing with one Environment and a limited set of objects. This approach gets little difficult to manage with multiple environments and number of customization objects. Every environment may be unique, may have a different set of requirements. There can be a lot of solutions which can help you in this situation. Helm, Kustomize, Kapitan, Ksonnet .. the list is long. Helm, a template engine is no doubt leading this race but if you are not looking for template base solution then Kustomize can help you out as well.

Template vs Overlay

Consider you have a file that has certain variables in it as a placeholder. These placeholders allow you to manage that file passing different values at runtime. This is a template mechanism.

Consider you have another file that has specific data in it. You use sed to replace specific data as per your requirement. This is overlay mechanism. An overlay is a set of replacement strings. You can replace specific blocks of data with another block or merge with them.

Helm is templating engine…

--

--