All You Need to Know About Kustomize
Lingxian Kong
28th Nov 2023
About Lingxian
1 2012 ~ 2016
Huawei
OpenStack DevTeam Lead
2
2016 ~ 2021
Catalyst Cloud
Senior Cloud Platform Engineer
3 2021 ~ Now
Sourced Group
Lead Cloud Consultant
AWS Certified
Solutions
Architect
Azure Solutions
Architect Expert
Professional
Google Cloud
Architect
Certified
Kubernetes
Administrator
Kustomize
Kubernetes native configuration management
Kustomize introduces a template-free way to customize application configuration that simplifies the
use of off-the-shelf applications. Now, built into kubectl
No templating, no domain-specific configuration languages
Take over existing application manifests
kubectl built-in
Overlay pattern
🖥️Demo
SIGCLI
TheKustomizationFile
Anoverviewofthecontentofakustomizationfile.
🤔Why We Need Yet Another Conguration
Tool?
Helm
Helm helps you manage Kubernetes applications — Helm Charts are easy to create, version, share, and publish.
helmrepoaddargohttps://argoproj.github.io/argo-helm
helminstallargocdargo/argo-cd
Helm Template Language
However, Helm template could be ugly…because of the templating.
Conflict with other tools, e.g. Argo Workflows
Kpt
Automates Kubernetes configuration editing.
Kpt package: A bundle of configuration data. It is represented as a directory tree containing Kubernetes resource manifests.
Kpt function: Containerized program that can perform CRUD operations on KRM resources stored on the local filesystem. Any
general-purpose or domain-specific language can be used to create functions to transform and/or validate the Kubernetes
resource manifest input/output format.
kptpkggethttps://github.com/GoogleContainerTools/kpt.git/package-examples/wordpress@v0.9
#wordpress/Kptfile
apiVersion:kpt.dev/v1
kind:Kptfile
metadata:
name:wordpress
pipeline:
mutators:
-image:gcr.io/kpt-fn/set-labels:v0.1
configMap:
app:wordpress
validators:
-image:gcr.io/kpt-fn/kubeval:v0.1
$kptfnrenderwordpress
$kptliveinitwordpress
$kptliveapplywordpress--reconcile-timeout=2m
ArgoCD Integration
Challenges
Upstream Incompatible Change
GitHub
ConfigMapGeneratorshouldnotloadvaluesfromthebuild…
Itrecently cameto@natasha41575and my attentionthatthe
configMapGenerator hasabugwhereitwillload valuesfromtheenvironme…
Pull Request Review is Hard
Thank You

All You Need to Know About Kustomize

  • 1.
    All You Needto Know About Kustomize Lingxian Kong 28th Nov 2023
  • 2.
    About Lingxian 1 2012~ 2016 Huawei OpenStack DevTeam Lead 2 2016 ~ 2021 Catalyst Cloud Senior Cloud Platform Engineer 3 2021 ~ Now Sourced Group Lead Cloud Consultant AWS Certified Solutions Architect Azure Solutions Architect Expert Professional Google Cloud Architect Certified Kubernetes Administrator
  • 3.
    Kustomize Kubernetes native configurationmanagement Kustomize introduces a template-free way to customize application configuration that simplifies the use of off-the-shelf applications. Now, built into kubectl No templating, no domain-specific configuration languages Take over existing application manifests kubectl built-in Overlay pattern 🖥️Demo SIGCLI TheKustomizationFile Anoverviewofthecontentofakustomizationfile.
  • 4.
    🤔Why We NeedYet Another Conguration Tool? Helm Helm helps you manage Kubernetes applications — Helm Charts are easy to create, version, share, and publish. helmrepoaddargohttps://argoproj.github.io/argo-helm helminstallargocdargo/argo-cd Helm Template Language However, Helm template could be ugly…because of the templating. Conflict with other tools, e.g. Argo Workflows Kpt Automates Kubernetes configuration editing. Kpt package: A bundle of configuration data. It is represented as a directory tree containing Kubernetes resource manifests. Kpt function: Containerized program that can perform CRUD operations on KRM resources stored on the local filesystem. Any general-purpose or domain-specific language can be used to create functions to transform and/or validate the Kubernetes resource manifest input/output format. kptpkggethttps://github.com/GoogleContainerTools/kpt.git/package-examples/wordpress@v0.9 #wordpress/Kptfile apiVersion:kpt.dev/v1 kind:Kptfile metadata: name:wordpress pipeline: mutators: -image:gcr.io/kpt-fn/set-labels:v0.1 configMap: app:wordpress validators: -image:gcr.io/kpt-fn/kubeval:v0.1 $kptfnrenderwordpress $kptliveinitwordpress $kptliveapplywordpress--reconcile-timeout=2m
  • 5.
  • 6.
    Challenges Upstream Incompatible Change GitHub ConfigMapGeneratorshouldnotloadvaluesfromthebuild… Itrecentlycameto@natasha41575and my attentionthatthe configMapGenerator hasabugwhereitwillload valuesfromtheenvironme… Pull Request Review is Hard
  • 7.