Back to Skills

kustomize-basics

verified

Use when customizing Kubernetes configurations without templates using Kustomize overlays and patches.

View on GitHub

Marketplace

han

TheBushidoCollective/han

Plugin

jutsu-kustomize

Technique

Repository

TheBushidoCollective/han
60stars

jutsu/jutsu-kustomize/skills/kustomize-basics/SKILL.md

Last Verified

January 24, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/TheBushidoCollective/han/blob/main/jutsu/jutsu-kustomize/skills/kustomize-basics/SKILL.md -a claude-code --skill kustomize-basics

Installation paths:

Claude
.claude/skills/kustomize-basics/
Powered by add-skill CLI

Instructions

# Kustomize Basics

Kubernetes configuration customization without templates.

## Basic Structure

```
app/
├── base/
│   ├── kustomization.yaml
│   ├── deployment.yaml
│   └── service.yaml
└── overlays/
    ├── development/
    │   └── kustomization.yaml
    └── production/
        └── kustomization.yaml
```

## Base Kustomization

```yaml
# base/kustomization.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
  - deployment.yaml
  - service.yaml

commonLabels:
  app: myapp
  
namePrefix: myapp-

images:
  - name: myapp
    newTag: v1.0.0
```

## Overlay Kustomization

```yaml
# overlays/production/kustomization.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

bases:
  - ../../base

replicas:
  - name: myapp-deployment
    count: 5

images:
  - name: myapp
    newTag: v2.0.0

patches:
  - patch: |-
      apiVersion: apps/v1
      kind: Deployment
      metadata:
        name: myapp-deployment
      spec:
        template:
          spec:
            containers:
            - name: myapp
              resources:
                limits:
                  memory: "1Gi"
                  cpu: "1000m"
```

## Common Commands

```bash
# Build kustomization
kustomize build base/

# Build overlay
kustomize build overlays/production/

# Apply with kubectl
kubectl apply -k overlays/production/

# Diff before apply
kubectl diff -k overlays/production/
```

## Transformers

### Common Labels

```yaml
commonLabels:
  app: myapp
  environment: production
```

### Name Prefix/Suffix

```yaml
namePrefix: prod-
nameSuffix: -v2
```

### Namespace

```yaml
namespace: production
```

### Config Map Generator

```yaml
configMapGenerator:
  - name: app-config
    files:
      - config.properties
    literals:
      - LOG_LEVEL=info
```

### Secret Generator

```yaml
secretGenerator:
  - name: app-secrets
    literals:
      - password=secret123
```

## Best Practices

### Use Bases for Common Configuration

Keep common configuration in 

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
2014 chars