Use when generating ConfigMaps and Secrets with Kustomize for Kubernetes configuration management.
View on GitHubTheBushidoCollective/han
jutsu-kustomize
January 24, 2026
Select agents to install to:
npx add-skill https://github.com/TheBushidoCollective/han/blob/main/jutsu/jutsu-kustomize/skills/kustomize-generators/SKILL.md -a claude-code --skill kustomize-generatorsInstallation paths:
.claude/skills/kustomize-generators/# Kustomize Generators
Master ConfigMap and Secret generation using Kustomize generators for managing application configuration, credentials, and environment-specific settings without manual YAML creation.
## Overview
Kustomize generators automatically create ConfigMaps and Secrets from literals, files, and environment files. Generated resources include content hashes in their names, enabling automatic rollouts when configuration changes.
## ConfigMap Generator Basics
### Literal Values
```yaml
# kustomization.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
configMapGenerator:
- name: app-config
literals:
- DATABASE_URL=postgresql://localhost:5432/mydb
- LOG_LEVEL=info
- CACHE_ENABLED=true
- MAX_CONNECTIONS=100
- TIMEOUT_SECONDS=30
```
Generated ConfigMap:
```yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: app-config-8g2h5m9k7t
data:
DATABASE_URL: postgresql://localhost:5432/mydb
LOG_LEVEL: info
CACHE_ENABLED: "true"
MAX_CONNECTIONS: "100"
TIMEOUT_SECONDS: "30"
```
### File-Based Generation
```yaml
# kustomization.yaml
configMapGenerator:
- name: app-config
files:
- application.properties
- config/database.conf
- config/logging.yml
```
With files:
```properties
# application.properties
server.port=8080
server.host=0.0.0.0
app.name=MyApplication
app.version=1.0.0
```
```conf
# config/database.conf
max_connections = 100
shared_buffers = 256MB
effective_cache_size = 1GB
```
```yaml
# config/logging.yml
level: info
format: json
outputs:
- stdout
- file: /var/log/app.log
```
### Named Files
```yaml
configMapGenerator:
- name: app-config
files:
- config.properties=application.properties
- db.conf=config/database.conf
- log.yml=config/logging.yml
```
Generated ConfigMap:
```yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: app-config-9m4k8h2f6d
data:
config.properties: |
server.port=8080
server.host=0.0.0.0
app.na