スキル一覧に戻る
TheBushidoCollective

kustomize-basics

by TheBushidoCollective

A curated marketplace of Claude Code plugins that embody the principles of ethical and professional software development.

60🍴 6📅 2026年1月24日
GitHubで見るManusで実行

SKILL.md


name: kustomize-basics description: Use when customizing Kubernetes configurations without templates using Kustomize overlays and patches. allowed-tools: []

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

# 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

# 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

# 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

commonLabels:
  app: myapp
  environment: production

Name Prefix/Suffix

namePrefix: prod-
nameSuffix: -v2

Namespace

namespace: production

Config Map Generator

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

Secret Generator

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

Best Practices

Use Bases for Common Configuration

Keep common configuration in base and environment-specific in overlays.

Strategic Merge Patches

patches:
  - path: patch-deployment.yaml

JSON Patches

patchesJson6902:
  - target:
      group: apps
      version: v1
      kind: Deployment
      name: myapp
    patch: |-
      - op: replace
        path: /spec/replicas
        value: 3

スコア

総合スコア

70/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

+10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です