kustomize-generators
БесплатноБез исполняемых скриптовНе проверенUse when generating ConfigMaps and Secrets with Kustomize for Kubernetes configuration management.
от TheBushidoCollective★ 202 звезды на GitHubОб этом скилле
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
# 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:
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
# kustomization.yaml
configMapGenerator:
- name: app-config
files:
- application.properties
- config/database.conf
- config/logging.yml
With files:
# application.properties
server.port=8080
server.host=0.0.0.0
app.name=MyApplication
app.version=1.0.0
# config/database.conf
max_connections = 100
shared_buffers = 256MB
effective_cache_size = 1GB
# config/logging.yml
level: info
format: json
outputs:
- stdout
- file: /var/log/app.log
Named Files
configMapGenerator:
- name: app-config
files:
- config.properties=application.properties
- db.conf=config/database.conf
- log.yml=config/logging.yml
Generated ConfigMap:
apiVersion: v1
kind: ConfigMap
metadata:
name: app-config-9m4k8h2f6d
data:
config.properties: |
server.port=8080
server.host=0.0.0.0
app.name=MyApplication
app.version=1.0.0
db.conf: |
max_connections = 100
shared_buffers = 256MB
effective_cache_size = 1GB
log.yml: |
level: info
format: json
outputs:
- stdout
- file: /var/log/app.log
Environment Files
configMapGenerator:
- name: app-config
envs:
- .env
- config/.env.production
With files:
# .env
DATABASE_URL=postgresql://localhost:5432/mydb
REDIS_URL=redis://localhost:6379
LOG_LEVEL=info
# config/.env.production
DATABASE_URL=postgresql://prod-db:5432/mydb
REDIS_URL=redis://prod-redis:6379
LOG_LEVEL=warn
MONITORING_ENABLED=true
Mixed Sources
configMapGenerator:
- name: app-config
literals:
- APP_NAME=MyApp
- APP_VERSION=1.0.0
files:
- application.properties
envs:
- .env
Secret Generator Basics
Literal Values
secretGenerator:
- name: app-secrets
type: Opaque
literals:
- database-password=super-secret-password
- api-key=1234567890abcdef
- jwt-secret=my-jwt-secret-key
Generated Secret:
apiVersion: v1
kind: Secret
metadata:
name: app-secrets-2f6h8k9m4t
type: Opaque
data:
database-password: c3VwZXItc2VjcmV0LXBhc3N3b3Jk
api-key: MTIzNDU2Nzg5MGFiY2RlZg==
jwt-secret: bXktand0LXNlY3JldC1rZXk=
File-Based Secrets
secretGenerator:
- name: tls-secret
type: kubernetes.io/tls
files:
- tls.crt=certs/server.crt
- tls.key=certs/server.key
Docker Registry Secret
secretGenerator:
- name: docker-registry
type: kubernetes.io/dockerconfigjson
files:
- .dockerconfigjson=docker-config.json
With docker-config.json:
{
"auths": {
"registry.example.com": {
"username": "myuser",
"password": "mypassword",
"email": "[email protected]",
"auth": "bXl1c2VyOm15cGFzc3dvcmQ="
}
}
}
SSH Key Secret
secretGenerator:
- name: ssh-keys
type: Opaque
files:
- id_rsa=keys/id_rsa
- id_rsa.pub=keys/id_rsa.pub
Generator Behaviors
Create Behavior (Default)
configMapGenerator:
- name: app-config
behavior: create
literals:
- KEY=value
Creates a new ConfigMap. Fails if one already exists.
Replace Behavior
configMapGenerator:
- name: app-config
behavior: replace
literals:
- KEY=new-value
Replaces existing ConfigMap entirely. Fails if it doesn't exist.
Merge Behavior
# base/kustomization.yaml
configMapGenerator:
- name: app-config
literals:
- LOG_LEVEL=info
- CACHE_ENABLED=true
- DATABASE_URL=localhost
# overlays/production/kustomization.yaml
configMapGenerator:
- name: app-config
behavior: merge
literals:
- LOG_LEVEL=warn
- DATABASE_URL=prod-db.example.com
Resulting ConfigMap merges values:
data:
LOG_LEVEL: warn # Overr
Установить kustomize-generators в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
BashReadFAQ
Что делает скилл kustomize-generators?
Use when generating ConfigMaps and Secrets with Kustomize for Kubernetes configuration management.
Как установить скилл kustomize-generators?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл kustomize-generators запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
ci-review
The scan that the plugin's GitHub Action runs.
от Anthropicazure-static-web-apps
Helps create, configure, and deploy Azure Static Web Apps using the SWA CLI. Use when deploying static sites to Azure, setting up SWA local development…
от GitHubai-ready
Make any repo AI-ready — analyzes your codebase and generates AGENTS.md, copilot-instructions.md, CI workflows, issue templates, and more. Mines your PR…
от GitHubaws-cdk-python-setup
Setup and initialization guide for developing AWS CDK (Cloud Development Kit) applications in Python. This skill enables users to configure environment…
от GitHub