This repository contains Kustomize configurations for deploying various applications on Kubernetes. These manifests provide reusable, customizable templates for common application deployments.
- redis: Redis cluster with Sentinel for high availability.
- reloader: Reloader controller that automatically triggers rolling updates on Deployments, StatefulSets, DaemonSets, and CronJobs when referenced ConfigMaps or Secrets are updated.
The examples/ directory contains sample overlays demonstrating how to
customize the base components for different environments:
- redis/dev: Development environment with 3 Redis replicas (password-protected) and 1 Sentinel replica (password-protected). Uses minimal resources suitable for development/testing.
To deploy an example:
kubectl apply --kustomize examples/redis/overlays/dev/
Use kubectl apply --kustomize <component>/ to deploy the components.
For example:
kubectl apply --kustomize components/redis/
These manifests can serve as base configurations for your applications. To create an overlay:
- Create a new directory for your application, e.g.,
my-app/ - Inside
my-app/, create akustomization.yamlthat references this repo as a base:
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
bases:
- github.com/stn-dts/kustomize-manifests/components/redis?ref=redis-7.4.7
patchesStrategicMerge:
- patch.yaml
#
# Add your customizations here
#- Apply with:
kubectl apply --kustomize my-app/
- Always use overlays for environment-specific customizations
- Store secrets securely using Kubernetes secrets or external secret managers
- Validate manifests with
kubectl apply --dry-run=client --kustomize <dir>/ - Use resource limits and requests to prevent resource starvation
- Enable Pod Disruption Budgets for high availability
components/: Directory containing Kustomize bases for different applications.examples/: Sample overlays showing how to customize components for specific environments.