Kustomize introduces a template-free way to customize application configuration that simplifies the use of off-the-shelf applications. Now, built into kubectl as apply -k.

If you have a directory with a couple of kubernetes yaml files and you want to make an edit to one without committing a change, you can add a kustomization.yaml to make a change to one of the config files.

  • kustomize reads plain kubernetes yaml
  • you can kubectl appply that yaml without kustomize
  • you can drop in a kustomize file to make adjustments

things that you can / want to customize between environments

  • change image tags
  • change image tags
  • change cpu memory etc.
  • change policies and network

overlays

  • use case separate dev / staging / production
  • example
    • dev: runs image hourly build
    • staging runs image passed QA, 1% of prod traffic
    • production: has fixed version, big replicas and big cpu
  • kustomization
    • change prefixes
    • add specific tags to resources
  • folder structure: base and overlays directories
    • e.g. replica_count.yaml and cpu_count.yaml to change and possible reuse these

references