Introduction to Kustomize
Kustomize uses overlays for Kubernetes manifests to add, remove, or update configuration options without forking. What Kustomize does is take a Kubernetes template, patch it with specified changes in kustomization.yaml
, and then deploy it to Kubernetes.
It is a handy tool for patching non-complex applications, for example, with changes needed for different environments or resource namespacing.
Kustomize is available as a standalone binary and as a native command in kubectl
since v.1.14.
Let's look at a couple of Kustomize commands, use the following command:
- To show the generated modified templates on the terminal, use the following command:
$ kubectl kustomize base
- To deploy generated modified templates on Kubernetes:
$ kubectl apply –k base
In the preceding examples, base
is the folder that has the application files and kustomization.yaml
.
Note
The preceding commands will fail as there is no base
folder. This...