Directory Structure
The base overlays are located inoverlays/base/ and organized by component:
Base Overlay Anatomy
Each base overlay typically contains:- kustomization.yaml - Defines resources to include
- namespace.yaml - Namespace definition (if needed)
- helm-repository.yaml - Helm chart repository (for Helm-based apps)
- helm-release.yaml or helmrelease.yaml - HelmRelease definition
- deployment.yaml - Deployment manifest (for non-Helm apps)
- service.yaml - Service definition (for non-Helm apps)
Example: cert-manager Base
- kustomization.yaml
- namespace.yaml
- helm-repository.yaml
- helm-release.yaml
overlays/base/cert-manager/kustomization.yaml
Infrastructure Components
Helm-Based Components
These components use Helm charts and include HelmRepository + HelmRelease:cert-manager
TLS certificate management with Let’s Encrypt integration
grafana-operator
Manages Grafana instances using Kubernetes operators
grafana-loki
Log aggregation and storage system
grafana-alloy
Collects and forwards telemetry data
metallb
Provides LoadBalancer services for bare-metal clusters
kgateway
Kubernetes Gateway API implementation
metrics-server
Provides resource metrics API for HPA and kubectl top
prometheus
Complete monitoring stack with Alertmanager
sealed-secrets
Encrypts secrets for safe storage in Git
tailscale
VPN operator for secure networking
n8n
Workflow automation and integration platform
Kubernetes Manifest Components
These components use plain Kubernetes manifests:bind9
DNS server deployment with ConfigMap-based configuration
knowledge-hub
Knowledge base application with Deployment + Service
version-management
Application version tracking system
yopass
Secure secret sharing with time-limited access
Kustomization.yaml Structure
Base kustomization files define which resources to include:Simple Example
With Multiple Components
overlays/kimawesome/infrastructure/observability/kustomization.yaml
With Namespace Transformation
my-namespace unless they explicitly specify a namespace.
Using Base Overlays
Environment overlays reference base overlays in their kustomization:Customization Patterns
Shared Helm Repository
Multiple components can share a HelmRepository:- grafana-operator
- grafana-loki
- grafana-alloy
Minimal Configuration
Base overlays provide minimal, production-ready defaults. Environment overlays add specific configuration: Base (minimal):Benefits of Base Overlays
Reusability
Reusability
Define each component once, reuse across all environments. Changes to base configurations automatically propagate.
Consistency
Consistency
All environments start with the same base configuration, ensuring consistency across dev, staging, and production.
Separation of Concerns
Separation of Concerns
Base overlays contain application definitions. Environment overlays contain environment-specific configuration.
Easy Updates
Easy Updates
Update chart versions or configurations in one place. All environments benefit from the update.
Testability
Testability
Base configurations can be tested independently before applying to production environments.
Best Practices
- Keep bases minimal - Only include essential configuration
- Use semantic versioning - Pin exact chart versions in bases
- Document dependencies - Use comments to explain why specific settings exist
- Avoid environment-specific values - Move those to environment overlays
- Group related components - Use subdirectories for component families (e.g., grafana/)
- Include all required resources - Namespace, HelmRepository, and HelmRelease