Back to Certified Kubernetes Administrator (CKA) Tutorial
Addendum: In the video I suggested that one needed to install Kustomize separately. This is not the case as of the most recent versions of Kubernetes CLI as it is built-in to kubectl.
None
Kustomize is a standalone tool to customize Kubernetes objects through a kustomization file.
-Kubernetes-Declarative Management of Kubernetes Objects Using Kustomize
Somewhat overlaps with the functionality of Helm.
It is quite common to set cross-cutting fields for all Kubernetes resources in a project. Some use cases for setting cross-cutting fields
-Kubernetes-Declarative Management of Kubernetes Objects Using Kustomize
Replicate the Name and Label example; looking at project folder.
kubectl kustomize project
Then apply:
kubectl apply -k project
On top of Resources, one can apply different customizations by applying patches. Kustomize supports different patching mechanisms
-Kubernetes-Declarative Management of Kubernetes Objects Using Kustomize
The use of the term "patch" implies (at least to me) that this feature is intended to allow for incremental updates to an application over time.
Examine project-patch folder:
kubectl kustomize project-patch
Kustomize has the concepts of bases and overlays. A base is a directory with a kustomization.yaml, which contains a set of resources and associated customization. A base could be either a local directory or a directory from a remote repo, as long as a kustomization.yaml is present inside. An overlay is a directory with a kustomization.yaml that refers to other kustomization directories as its bases.
-Kubernetes-Declarative Management of Kubernetes Objects Using Kustomize
This feature appears to allow for different varients of an application; much like Helm Releases.
kubectl kustomze project-base/dev
kubectl kustomze project-base/prod
ConfigMap and Secret hold config or sensitive data that are used by other Kubernetes objects, such as Pods. The source of truth of ConfigMap or Secret are usually from somewhere else, such as a .properties file or a ssh key file.
-Kubernetes-Declarative Management of Kubernetes Objects Using Kustomize
See example in project-cm.
kubectl kustomize project-cm