/infra-skills:k8s-kustomize-conventionsfrom infra-skills
Use when writing, changing or reviewing Kubernetes manifests or Kustomize files. Defines base-and-overlay structure, patch patterns, manifest validation, image-transform limits, and how overlays map to GitOps sync targets.
Ships in infra-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Example layout (adapt the root path and environment names to the project — the base/overlay split is the convention):
infrastructure/kubernetes/
├── base/<component>/ # Reusable base resources (no env-specific config)
└── overlays/<env>/<app>/ # Environment patches (tolerations, GPU, resources, replicas)
├── kustomization.yaml
└── <patch-files>.yaml
Each overlays/<env>/<app>/ directory is one deployable unit — when the project uses a GitOps controller (Argo CD, Flux, or similar; see its platform-conventions local skill, if it defines one), that directory is the sync target. Base resources are shared — changes to base manifests propagate to every overlay. Treat base changes as high blast-radius; prefer overlay patches for environment-specific concerns.
On clusters that schedule workloads onto control-plane nodes (check the project's platform-conventions local skill, if it defines one), every overlay must include a toleration patch for the control-plane taint:
# overlays/<env>/<app>/toleration-patch.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: <app>
spec:
template:
spec:
tolerations:
- key: node-role.kubernetes.io/control-plane
operator: Exists
effect: NoSchedule
On such clusters, pods without this toleration will not schedule anywhere. On clusters with dedicated workers, omit it.
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../base/<component>
patches:
- path: toleration-patch.yaml
target:
kind: Deployment
name: <app>
GPU overlays additionally require node placement and resource limits — applied via overlay patch, never in base:
spec:
template:
spec:
nodeSelector:
kubernetes.io/hostname: <node-name> # a GPU node — see the project's topology local skill
containers:
- name: <app>
resources:
limits:
nvidia.com/gpu: 1
Before opening a PR:
kubectl kustomize infrastructure/kubernetes/overlays/<env>/<app>
This validates that the kustomization resolves without error. It does not apply anything to the cluster. Add kubectl apply --dry-run=server -f - against a cluster when schema validation against live CRDs matters.
To share a read-only asset library (e.g. ML model weights) across namespaces: a dedicated namespace holds static PVs pointing at an NFS (or other RWX) export, and each consumer namespace binds a matching RWX PVC with storageClassName: "" to bypass dynamic provisioning.
Do not change storageClassName on these PVCs — the empty string is intentional to bind to the static PV. The concrete instance (export host and path, consuming apps, mount wiring) lives in the project's topology local skill, if it defines one.
Kustomize image transforms only rewrite fields Kustomize knows are images. They do not reach custom resources such as Argo Workflows WorkflowTemplates unless the project teaches Kustomize those field paths (configurations:). If pinning an image in such a CRD, set the tag directly in its YAML — do not rely on images: in kustomization.yaml to propagate there.
When reviewing a change to manifests or Kustomize files (with k8s-workload-patterns for the workload spec itself):
kubectl kustomize <overlay> resolves without error for every overlay the change touches, including overlays that inherit a changed basestorageClassName: ""images:What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub pixeloven/crew --plugin infra-skills8 skills in this plugin
/ansible-conventionsUse when writing, changing or reviewing Ansible roles, playbooks, or inventory. Covers repository structure, runtime secret injection, Jinja2/bash delimiter traps, boot-only hardware services, and idempotent check-mode runs./github-actions-conventionsUse when writing or reviewing GitHub Actions workflows or CI. Covers workflow structure, action pinning, secret access, gh CLI usage, uv-based Python jobs, gitleaks scanning, and automated-commit patterns./go-public-reviewUse before making a GitHub repository public, or when reviewing a public one. Audits history, commit metadata and PR refs for exposed content, plus branch and tag rules, docs, public CI, security policy and licence; grades each finding.Other plugins' skills for the same job