/selamy-skills:colocated-pod-tolerationsfrom selamy-skills
Use when a Kubernetes Job, CronJob, or Pod is pinned to a specific node (via podAffinity, nodeSelector, or nodeAffinity) to share a node or an RWO volume. It must also carry that node's tolerations or it is permanently unschedulable.
Ships in selamy-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.
When you pin a Pod to a particular node so it can share something node-local —
most often a ReadWriteOnce PersistentVolume already mounted by a StatefulSet
pod, or a GPU/local disk on a tainted node — you express the pinning with
podAffinity + topologyKey: kubernetes.io/hostname, nodeSelector, or
nodeAffinity. That makes the scheduler want a specific node.
But the target node is frequently tainted (dedicated node pools, GPU pools,
spot pools, and StatefulSet-owned nodes commonly are). Affinity does not grant
the right to land on a tainted node — only a matching toleration does. A pod
with the affinity but no toleration is steered toward a node it is then
forbidden to run on, so it sits Pending/Unschedulable forever.
Failed/never-started runs; nothing
crashes loudly. The pod template looks correct in review.Any pod you pin to a node must carry the full toleration set of that node.
If you copy affinity/nodeSelector from another workload to colocate with it,
copy that workload's tolerations in the same edit. Affinity and tolerations
are a pair when targeting tainted nodes — never one without the other.
spec:
affinity:
podAffinity: # land on the same node as the owner pod
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchLabels: { app: stateful-owner }
topologyKey: kubernetes.io/hostname
tolerations: # REQUIRED — the owner's node is tainted
- key: dedicated
operator: Equal
value: stateful-owner
effect: NoSchedule
Sharing one node to reach an RWO volume is a smell. Before colocating, ask
whether the job can read a snapshot/clone of the volume, or whether the
volume should be ReadWriteMany, so the job needs no node pinning and no
tolerations. Colocation is the fallback, not the default.
Add a render/template test that fails the build when a manifest declares node-pinning without tolerations:
helm template, kustomize build, or your
generator).podAffinity/nodeSelector/nodeAffinity targeting a known tainted
pool, it also has a toleration matching that pool's taint.A unit test on the rendered YAML catches the silent class before it ships;
a cluster smoke check (kubectl get pods --field-selector status.phase=Pending
after deploy, alert on age) catches the dormant case after a taint appears.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub selamy-labs/agent-skills --plugin selamy-skills111 skills in this plugin
/adaptive-estimationUse when tracking a slowly-varying latent quantity from noisy measurements with quantifiable uncertainty — a drifting metric, capacity, latency trend, or confidence. Prefer a Kalman-style adaptive estimator over fixed moving averages or static thresholds./adaptive-loop-budgetingUse when an autonomous loop needs explicit limits on attempts, time, cost, tool calls, verification depth, or risk, and a clear stop, continue, yield, or escalate decision./adopt-and-deleteUse when adopting a shared module, library, chart, or service, or doing any consolidation, migration, or refactor that supersedes existing code. The change that adds the replacement must REMOVE what it replaced, in the same atomic change.