- To manage and customize configuration files, enabling more flexible and maintainable deployments.
- Kustomize is configuration management solution for customizing your applications in Kubernetes, where you can keep the original settings as a base and then apply changes using special configuration files, called patches, without actually altering the original files. This allows you to tweak your applications without messing up their core configuration.
-
Kubernetes Cluster
minikube start --nodes=2 --kubernetes-version v1.25.14
can be used to create a simple cluster in your local machine
-
kubectl version
If you have 1.21 or above of kubectl you will have access to kubectl kustomize which is the recommended method. If you aren't on version 1.21 or above, upgrade kubectl. (4*)
- Create namespaces
kubectl create namespace dev
kubectl create namespace prod
kustomize build overlays/dev
kustomize build overlays/prod
kubectl apply -k overlays/dev
kubectl apply -k overlays/prod