Files
awesome-kubernetes/v2-docs/kustomize.md

131 lines
22 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Template-Free Configuration Customization with Kustomize (Kubernetes Native Configuration Management)
!!! tip "Nubenetes V2 Elite Portal"
You are browsing the AI-Curated V2 Elite Edition. Looking for the exhaustive list of references? Check out the [**V1 Historical Archive**](/v1/kustomize/).
!!! info "Architectural Context"
Detailed reference for Template-Free Configuration Customization with Kustomize (Kubernetes Native Configuration Management) in the context of Hardened Infrastructure.
## Table of Contents
1. [Application Configuration](#application-configuration)
- [Declarative GitOps](#declarative-gitops)
- [Helm and Kustomize](#helm-and-kustomize)
- [Kustomize](#kustomize)
- [Kustomize Introduction](#kustomize-introduction)
- [Kustomize Tutorials](#kustomize-tutorials)
1. [Architectural Foundations](#architectural-foundations)
- [Kubernetes Tools](#kubernetes-tools)
- [General Reference](#general-reference)
1. [Cloud Native](#cloud-native)
- [Kubernetes](#kubernetes)
- [Configuration Management](#configuration-management)
- [Extensibility](#extensibility)
- [GitOps](#gitops)
- [Microservice Deployment](#microservice-deployment)
- [Security](#security)
- [Policy Enforcement](#policy-enforcement)
- [Secrets Management](#secrets-management)
1. [Declarative GitOps](#declarative-gitops-1)
- [GitOps Frameworks](#gitops-frameworks)
- [Kubestack](#kubestack)
1. [Infrastructure Security](#infrastructure-security)
- [Inbound Traffic Management](#inbound-traffic-management)
- [Traefik](#traefik)
## Application Configuration
### Declarative GitOps
#### Helm and Kustomize
- **(2020)** [3 ways to customize off-the-shelf Helm charts with Kustomize - Kubernetes](https://tech.aabouzaid.com/2020/09/3-ways-to-customize-off-the-shelf-helm-charts-with-kustomize-kubernetes.html) <span class='md-tag md-tag--warning'>[N/A CONTENT]</span> <span class='md-tag md-tag--critical'>[ADVANCED LEVEL]</span> <span class='md-tag md-tag--info'>[COMMUNITY-TOOL]</span> — Detailed instructional article illustrating advanced integration techniques to post-process vendor-provided Helm charts using Kustomize. It covers inline rendering, custom patch structures, and Kustomize's native Helm generator mechanism. It resolves common pain points where a vendor-provided Helm chart lacks specific configurable values.
#### Kustomize
- **(2026)** [kustomize.io 🌟](https://kustomize.io) <span class='md-tag md-tag--warning'>[GO CONTENT]</span> <span class='md-tag md-tag--info'>[COMMUNITY-TOOL]</span> — Kustomize is a template-free configuration management utility that provides declarative customization of Kubernetes manifests without forking original files. It is natively integrated into the `kubectl` binary as the `-k` flag. Kustomize enables platform engineering teams to define reusable base manifests and layer overlay environments cleanly.
#### Kustomize Introduction
- **(2018)** [kubernetes.io: Introducing kustomize; Template-free Configuration Customization for Kubernetes](https://kubernetes.io/blog/2018/05/29/introducing-kustomize-template-free-configuration-customization-for-kubernetes) <span class='md-tag md-tag--warning'>[N/A CONTENT]</span> <span class='md-tag md-tag--info'>[COMMUNITY-TOOL]</span> — Official launch blog post introducing Kustomize to the Kubernetes community as an alternative to templated resource management. It explains the design philosophy of structured patch overlays and template-free generation, highlighting how this mitigates YAML bloat. This introductory post remains vital for understanding declarative config-as-code origins.
#### Kustomize Tutorials
- **(2026)** [Declarative Management of Kubernetes Objects Using Kustomize](https://kubernetes.io/docs/tasks/manage-kubernetes-objects/kustomization) <span class='md-tag md-tag--warning'>[N/A CONTENT]</span> <span class='md-tag md-tag--primary'>[DOCUMENTATION]</span> <span class='md-tag md-tag--info'>[COMMUNITY-TOOL]</span> — Up-to-date, official Kubernetes documentation detailing best practices for declaratively managing cluster objects using Kustomize overlays. It walks through configuring generator fields, secret generation, and prefix matching across multiple deployment stages. A vital reference manual for platform architects designing robust GitOps pipelines.
## Architectural Foundations
### Kubernetes Tools
#### General Reference
- [dex.dev: YAML Templating Solutions: Helm & Kustomize](https://www.dex.dev/dex-videos/templating-solutions) <span class='md-tag md-tag--info'>[COMMUNITY-TOOL]</span> — A curated technical resource and architectural guide covering dex.dev: YAML Templating Solutions: Helm & Kustomize in the Kubernetes Tools ecosystem.
- [nakamasato.medium.com: Comparison between Helm and Kustomize for Kubernetes' yaml management](https://nakamasato.medium.com/comparison-between-helm-and-kustomize-for-kubernetes-yaml-management-aed32cef2627) <span class='md-tag md-tag--info'>[COMMUNITY-TOOL]</span> — A curated technical resource and architectural guide covering nakamasato.medium.com: Comparison between Helm and Kustomize for Kubernetes' yaml management in the Kubernetes Tools ecosystem.
- [pauldally.medium.com: Kustomize Best Practices (Part 1)](https://pauldally.medium.com/kustomize-best-practices-part-1-86f9f22d2f20) <span class='md-tag md-tag--info'>[COMMUNITY-TOOL]</span> — A curated technical resource and architectural guide covering pauldally.medium.com: Kustomize Best Practices (Part 1) in the Kubernetes Tools ecosystem.
- [pauldally.medium.com: Kustomize Best Practices (Part 2)](https://pauldally.medium.com/kustomize-best-practices-part-2-c560f1fa1409) <span class='md-tag md-tag--info'>[COMMUNITY-TOOL]</span> — A curated technical resource and architectural guide covering pauldally.medium.com: Kustomize Best Practices (Part 2) in the Kubernetes Tools ecosystem.
- [notmattlucas.com: Kubernetes Configuration with Kustomize](https://notmattlucas.com/kubernetes-configuration-with-kustomize-f4dbba250f3) <span class='md-tag md-tag--info'>[COMMUNITY-TOOL]</span> — A curated technical resource and architectural guide covering notmattlucas.com: Kubernetes Configuration with Kustomize in the Kubernetes Tools ecosystem.
- [medium.com/@nanditasahu031: How to Start with Kustomize — its Features](https://medium.com/@nanditasahu031/how-to-start-with-kustomize-its-features-dd541c3d2fa8) <span class='md-tag md-tag--info'>[COMMUNITY-TOOL]</span> — A curated technical resource and architectural guide covering medium.com/@nanditasahu031: How to Start with Kustomize — its Features in the Kubernetes Tools ecosystem.
- [nicolasbarlatier.hashnode.dev: Introduction Kubernetes and Kustomize: How' to easily customize any resource configuration with Kustomize?](https://nicolasbarlatier.hashnode.dev/introduction-kubernetes-and-kustomize-how-to-easily-customize-any-resource-configuration-with-kustomize) <span class='md-tag md-tag--info'>[COMMUNITY-TOOL]</span> — A curated technical resource and architectural guide covering nicolasbarlatier.hashnode.dev: Introduction Kubernetes and Kustomize: How' to easily customize any resource configuration with Kustomize? in the Kubernetes Tools ecosystem.
- [pauldally.medium.com: Kustomize Best Practices (part 3)](https://pauldally.medium.com/kustomize-best-practices-part-3-1dbaa15fd16a) <span class='md-tag md-tag--info'>[COMMUNITY-TOOL]</span> — A curated technical resource and architectural guide covering pauldally.medium.com: Kustomize Best Practices (part 3) in the Kubernetes Tools ecosystem.
- [levelup.gitconnected.com: Helm vs. Kustomize: Navigating Kubernetes Configuration' Complexity](https://levelup.gitconnected.com/helm-vs-kustomize-navigating-kubernetes-configuration-complexity-ae86596c3cf2) <span class='md-tag md-tag--info'>[COMMUNITY-TOOL]</span> — A curated technical resource and architectural guide covering levelup.gitconnected.com: Helm vs. Kustomize: Navigating Kubernetes Configuration' Complexity in the Kubernetes Tools ecosystem.
- [blog.devgenius.io: Kustomize — K8 manifest patching](https://blog.devgenius.io/kustomize-simple-manifest-manipulation-9330f7f40d5d) <span class='md-tag md-tag--info'>[COMMUNITY-TOOL]</span> — A curated technical resource and architectural guide covering blog.devgenius.io: Kustomize — K8 manifest patching in the Kubernetes Tools ecosystem.
- [faun.pub: How to build a GitOps workflow with ArgoCD, Kustomize and GitHub' Actions](https://faun.pub/how-to-build-a-gitops-workflow-with-argocd-kustomize-and-github-actions-f919e7443295) <span class='md-tag md-tag--info'>[COMMUNITY-TOOL]</span> — A curated technical resource and architectural guide covering faun.pub: How to build a GitOps workflow with ArgoCD, Kustomize and GitHub' Actions in the Kubernetes Tools ecosystem.
## Cloud Native
### Kubernetes
#### Configuration Management
??? abstract "Architect's Technical Comparison Table"
| Solution | Maturity | Primary Focus | Language | Stars |
| :--- | :--- | :--- | :--- | :--- |
| [devopscube.com/kustomize-tutorial: Kustomize Tutorial: Comprehensive Guide For Beginners 🌟](https://devopscube.com/kustomize-tutorial) | | Configuration Management | English | 🌟🌟🌟🌟 |
| [itnext.io: Helm Is Not Enough, You Also Need Kustomize](https://itnext.io/helm-is-not-enough-you-also-need-kustomize-82bae896816e) | | Configuration Management | English | 🌟🌟🌟🌟 |
| [harness.io: Comparing Helm vs Kustomize 🌟](https://www.harness.io/blog/helm-vs-kustomize) | | Configuration Management | English | 🌟🌟🌟 |
| [opensource.com: Modify your Kubernetes manifests with Kustomize](https://opensource.com/article/21/6/kustomize-kubernetes) | | Configuration Management | English | 🌟🌟🌟 |
| [itnext.io: Generating, transforming, and patching Kubernetes configuration with Kustomize](https://itnext.io/generating-transforming-and-patching-kubernetes-configuration-with-kustomize-fb7b02476a1b) | | Configuration Management | English | 🌟🌟🌟 |
| [blog.stack-labs.com: Kustomize - The right way to do templating in Kubernetes](https://blog.stack-labs.com/code/kustomize-101) | | Configuration Management | English | 🌟🌟🌟 |
- **(2023)** [**devopscube.com/kustomize-tutorial: Kustomize Tutorial: Comprehensive Guide For Beginners 🌟**](https://devopscube.com/kustomize-tutorial) 🌟🌟🌟🌟 <span class='md-tag md-tag--success'>[ENTERPRISE-STABLE]</span> <span class='md-tag md-tag--secondary'>[GUIDE]</span> — A highly detailed, production-focused Kustomize comprehensive guide. Demystifies concepts of bases, overlays, generator options, namespace overrides, and programmatic variable injection, serving as an operational reference for scaling Kubernetes configurations.
- **(2021)** [**itnext.io: Helm Is Not Enough, You Also Need Kustomize**](https://itnext.io/helm-is-not-enough-you-also-need-kustomize-82bae896816e) 🌟🌟🌟🌟 <span class='md-tag md-tag--success'>[ENTERPRISE-STABLE]</span> — Evaluates the highly effective hybrid approach of combining Helm and Kustomize. Argues that Helm is best suited for external third-party chart packaging, while Kustomize provides critical customized overlay patches locally without forcing forks of complex charts.
- **(2023)** [harness.io: Comparing Helm vs Kustomize 🌟](https://www.harness.io/blog/helm-vs-kustomize) 🌟🌟🌟 <span class='md-tag md-tag--info'>[COMMUNITY-TOOL]</span> — Duplicate entry of Harness comparison. Synthesizes key operational criteria including template complexity, dynamic runtime capability, ease of local development, and fit within GitOps Git structures.
- **(2021)** [opensource.com: Modify your Kubernetes manifests with Kustomize](https://opensource.com/article/21/6/kustomize-kubernetes) 🌟🌟🌟 <span class='md-tag md-tag--info'>[COMMUNITY-TOOL]</span> <span class='md-tag md-tag--secondary'>[GUIDE]</span> — Step-by-step introduction to customizing Kubernetes manifests natively using Kustomize. Focuses on setting up basic configurations with kustomization.yaml, declaring base manifests, and safely applying targeted environmental patches to resources like Deployments and Services.
- **(2021)** [itnext.io: Generating, transforming, and patching Kubernetes configuration with Kustomize](https://itnext.io/generating-transforming-and-patching-kubernetes-configuration-with-kustomize-fb7b02476a1b) <span class='md-tag md-tag--critical'>[ADVANCED LEVEL]</span> 🌟🌟🌟 <span class='md-tag md-tag--info'>[COMMUNITY-TOOL]</span> — In-depth exploration of Kustomize's three primary stages: Generation (ConfigMaps, Secrets), Transformation (Common Labels, Namespaces), and Patching (Strategic Merge, JSON patches). Offers insights into programmatic schema alteration.
- **(2020)** [blog.stack-labs.com: Kustomize - The right way to do templating in Kubernetes](https://blog.stack-labs.com/code/kustomize-101) 🌟🌟🌟 <span class='md-tag md-tag--info'>[COMMUNITY-TOOL]</span> <span class='md-tag md-tag--secondary'>[GUIDE]</span> — An foundational exploration of declarative application customization in Kubernetes using Kustomize. It contrasts template-driven engines like Helm with Kustomize's overlay-based, template-free patching, focusing on clean resource organization across different environments without altering original YAML files.
- **(2023)** [dev.to: Kubernetes Kustomize Tutorial: A Beginner-Friendly Developer Guide!](https://dev.to/pavanbelagatti/kubernetes-kustomize-tutorial-a-beginner-friendly-developer-guide-322n) 🌟🌟 <span class='md-tag md-tag--info'>[COMMUNITY-TOOL]</span> <span class='md-tag md-tag--secondary'>[GUIDE]</span> — A simplified, practical walkthrough introducing Kustomize to developers. Details core primitives (resources, generators, transformers) and illustrates setting up clean, template-less pipelines to manage multi-tenant local environments.
- **(2023)** [techiescamp.com: Kubernetes Kustomize Crash Course](https://courses.devopscube.com/l/products) 🌟🌟 <span class='md-tag md-tag--info'>[COMMUNITY-TOOL]</span> <span class='md-tag md-tag--secondary'>[GUIDE]</span> — A fast-paced educational resource covering basic commands, structure of `kustomization.yaml`, and the deployment of a demo application using overlays. Highlights practical command line utilities such as `kubectl kustomize`.
- **(2021)** [dev.to: Introduction to Kustomize - How to customize Kubernetes objects kubernetes](https://dev.to/katiatalhi/introduction-to-kustomize-how-to-customize-kubernetes-objects-3e08) 🌟🌟 <span class='md-tag md-tag--info'>[COMMUNITY-TOOL]</span> <span class='md-tag md-tag--secondary'>[GUIDE]</span> — A practical tutorial covering Kustomize fundamentals, including base structures, namespaces, and target overlays. Details how to perform key-value injections, customize metadata, and scale replica sizes across environments while maintaining dry manifests.
#### Extensibility
- **(2022)** [tech.aabouzaid.com: Set OpenAPI patch strategy for Kubernetes Custom Resources - Kustomize](https://tech.aabouzaid.com/2022/11/set-openapi-patch-strategy-for-kubernetes-custom-resources-kustomize.html) <span class='md-tag md-tag--critical'>[ADVANCED LEVEL]</span> 🌟🌟🌟 <span class='md-tag md-tag--info'>[COMMUNITY-TOOL]</span> <span class='md-tag md-tag--secondary'>[GUIDE]</span> — Technical deep dive into configuring custom OpenAPI schemas for CRDs within Kustomize. Explores defining strategic merge patch strategies (e.g., replace, merge, or delete) on Custom Resources, bypassing default merge limitations of standard JSON patches.
#### GitOps
- **(2022)** [**codefresh.io: Applied GitOps with Kustomize**](https://octopus.com/blog/applied-gitops-with-kustomize) <span class='md-tag md-tag--critical'>[ADVANCED LEVEL]</span> 🌟🌟🌟🌟 <span class='md-tag md-tag--success'>[ENTERPRISE-STABLE]</span> — High-density exploration of integrating Kustomize into GitOps pipelines. Emphasizes structured multi-environment promotion strategies, maintaining a single source of truth, and coordinating configuration changes using tools like Argo CD to ensure cluster reconciliation matches Git state.
- **(2021)** [**github.com/kostis-codefresh: How to Model Your Gitops Environments with' kustomize 🌟**](https://github.com/kostis-codefresh/gitops-environment-promotion) <span class='md-tag md-tag--warning'>[YAML CONTENT]</span> 🌟🌟🌟🌟 <span class='md-tag md-tag--success'>[ENTERPRISE-STABLE]</span> — A seminal GitHub repository modeling scalable GitOps environment promotion. Outlines structural patterns for directory trees (base vs environments) that prevent duplicate configuration drift and simplify environment-specific promotions through Git commits.
#### Microservice Deployment
- **(2021)** [mirantis.com: Kustomize Tutorial: Creating a Kubernetes app out of multiple pieces](https://www.mirantis.com/blog/introduction-to-kustomize-part-1-creating-a-kubernetes-app-out-of-multiple-pieces) 🌟🌟🌟 <span class='md-tag md-tag--info'>[COMMUNITY-TOOL]</span> <span class='md-tag md-tag--secondary'>[GUIDE]</span> — Deep dive into aggregating disjointed Kubernetes manifests into unified, multi-service microservice applications. Demonstrates how to write custom patches and automatically manage rolling updates via resource generation mechanisms.
### Security
#### Policy Enforcement
- **(2020)** [chrisns/k8s-opa-boilerplate](https://github.com/chrisns/k8s-opa-boilerplate) <span class='md-tag md-tag--info'>⭐ 18</span> <svg class="v2-sparkline" width="50" height="15" viewBox="0 0 50 15" style="vertical-align: middle; display: inline-block; margin-left: 6px;" title="Activity Trend"><defs><linearGradient id="spark-grad-0c5edf9a" x1="0" y1="0" x2="1" y2="0"><stop offset="0%" stop-color="rgba(34, 211, 238, 0.2)" /><stop offset="100%" stop-color="var(--md-accent-fg-color)" /></linearGradient></defs><path class="v2-sparkline-path" d="M 0 2 L 10 2 L 20 7 L 30 5 L 40 13 L 50 6" fill="none" stroke="url(#spark-grad-0c5edf9a)" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" /><circle cx="50" cy="6" r="2" fill="var(--md-accent-fg-color)" /></svg> <span class='md-tag md-tag--warning'>[REGO CONTENT]</span> <span class='md-tag md-tag--critical'>[ADVANCED LEVEL]</span> 🌟 <span class='md-tag md-tag--info'>[COMMUNITY-TOOL]</span> — A minimal, highly instructional boilerplate repository demonstrating Open Policy Agent (OPA) integration inside Kubernetes using Gatekeeper. Helps bootstrap policy-as-code paradigms to secure deployments and enforce structural admission controls.
#### Secrets Management
- **(2020)** [Secretize 🌟](https://github.com/bbl/secretize) <span class='md-tag md-tag--info'>⭐ 71</span> <svg class="v2-sparkline" width="50" height="15" viewBox="0 0 50 15" style="vertical-align: middle; display: inline-block; margin-left: 6px;" title="Activity Trend"><defs><linearGradient id="spark-grad-6c350058" x1="0" y1="0" x2="1" y2="0"><stop offset="0%" stop-color="rgba(34, 211, 238, 0.2)" /><stop offset="100%" stop-color="var(--md-accent-fg-color)" /></linearGradient></defs><path class="v2-sparkline-path" d="M 0 9 L 10 13 L 20 9 L 30 6 L 40 12 L 50 12" fill="none" stroke="url(#spark-grad-6c350058)" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" /><circle cx="50" cy="12" r="2" fill="var(--md-accent-fg-color)" /></svg> <span class='md-tag md-tag--warning'>[GO CONTENT]</span> 🌟🌟 <span class='md-tag md-tag--info'>[COMMUNITY-TOOL]</span> — A lightweight command-line utility to convert raw secrets and environment variables directly into encrypted Kubernetes Secret manifests. Helpful for basic automation pipelines, although modern enterprise workflows typically favor external systems like Vault, External Secrets Operator, or sealed-secrets.
## Declarative GitOps (1)
### GitOps Frameworks
#### Kubestack
- **(2026)** [==Kubestack Gitops Framework==](https://github.com/kbst/terraform-kubestack) <span class='md-tag md-tag--info'>⭐ 709</span> <svg class="v2-sparkline" width="50" height="15" viewBox="0 0 50 15" style="vertical-align: middle; display: inline-block; margin-left: 6px;" title="Activity Trend"><defs><linearGradient id="spark-grad-b44ef4f3" x1="0" y1="0" x2="1" y2="0"><stop offset="0%" stop-color="rgba(34, 211, 238, 0.2)" /><stop offset="100%" stop-color="var(--md-accent-fg-color)" /></linearGradient></defs><path class="v2-sparkline-path" d="M 0 8 L 10 6 L 20 12 L 30 9 L 40 10 L 50 4" fill="none" stroke="url(#spark-grad-b44ef4f3)" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" /><circle cx="50" cy="4" r="2" fill="var(--md-accent-fg-color)" /></svg> <span class='md-tag md-tag--warning'>[HCL CONTENT]</span> <span class='md-tag md-tag--critical'>[ADVANCED LEVEL]</span> 🌟🌟🌟🌟🌟 <span class='md-tag md-tag--success'>[DE FACTO STANDARD]</span> — An open-source Terraform-driven GitOps framework configured to simplify public cloud Kubernetes platform deployments and application configurations. It leverages native inheritance behaviors of Terraform modules to manage multi-cluster topologies predictably. It bridges infrastructure provisioning and GitOps continuous delivery workflows.
## Infrastructure Security
### Inbound Traffic Management
#### Traefik
- **(2020)** [blog.tomarrell.com: Kustomize: Traefik v2.2 as a Kubernetes Ingress Controller](https://blog.tomarrell.com/post/traefik_v2_on_kubernetes) <span class='md-tag md-tag--warning'>[YAML CONTENT]</span> <span class='md-tag md-tag--info'>[COMMUNITY-TOOL]</span> — Technical integration blog detailing how to deploy and customize the Traefik v2.2 Ingress Controller using Kustomize configurations. It illustrates how to define overlays for environment-specific network values, secure SSL contexts, and service exposures. Useful reference for managing non-trivial ingress manifests programmatically.
---
💡 **Explore Related:** [IaC](./iac.md) | [Terraform](./terraform.md) | [Chef](./chef.md)