Kustomize is the template free way to customize kubernetes configuration of YAML. Configuration of kubernetes YAML file for different environment has not been an easy task.
In order for us to understand easily, without the help of Kustomize, we are going to need the different YAML file for all the environments.
When I first started with Kubernetes, I used to create multiple copies of the same manifest file for different environments (like dev, staging, production, etc). This process is very error-prone since you have to change everything manually.
In most of the cases, base deployment k8s yaml are the same and only differences were
So we can consider like base deployment file is always the same and some of the objects are changing from time to time. That is where we need help of the Kustomize instead of having separate yaml file for each environment, we can only have one base resources like deployment, service, storage and have it changed based on the environment we have. Let me walk you through with a very simple example.
This is our folder structure
Folder base → api-deloyment.yaml
Folder prod → kustomize.yaml
Let’s look at the diagram to understand how it works when I run
kubectl apply -k [<https://gitlab.com/kyawsithu96/k8s-kustomize-deep-dive/simple-deployment/prod>](<https://gitlab.com/kyawsithu96/k8s-kustomize-deep-dive/simple-deployment/prod>)

OFFICIAL DOCUMENTATION REFERENCE: https://github.com/minio/operator
Before we do, let’s understand k8s operator pattern.