colocated-pod-tolerations
Skill0 starsChanged 6 days agoMITView on GitHub
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.
In this repository108 other files it gives its agents.
- adaptive-estimationSkill
- adaptive-loop-budgetingSkill
- adopt-and-deleteSkill
- adversarial-reviewSkill
- agent-drives-uiSkill
- agentic-coding-loopSkill
- agent-otel-trajectorySkill
- agents-as-iac-modulesSkill
- ascii-ui-mockupsSkill
- authoring-html-emailSkill
- authoring-skills-vs-mcpSkill
- batched-ssh-enumerationSkill
- c4-architectureSkill
- challenge-the-premiseSkill
- codegraph-bootstrapSkill
- codegraph-worktree-startupSkill
- command-creatorSkill
- complexity-budgetsSkill
- connector-readinessSkill
- context-anchored-patchingSkill
- continuous-issue-resolutionSkill
- credential-proxySkill
- criticality-tiered-reportingSkill
- data-connector-buildingSkill
- declarative-firstSkill
- disk-pressure-forensicsSkill
- early-return-over-elseSkill
- email-triageSkill
- enums-codify-behaviorSkill
- ephemeral-workspace-lifecycleSkill
- event-sourcingSkill
- evidence-claim-boundariesSkill
- exhaustive-matchSkill
- feature-coverage-not-just-line-coverageSkill
- full-disk-forensicsSkill
- gate-before-pushSkill
- github-pr-shepherdingSkill
- graceful-shutdown-stateful-agentsSkill
- grounded-generationSkill
- iac-incident-responseSkill
- iac-not-ad-hocSkill
- instrumented-service-scaffoldSkill
- interface-over-conditionalsSkill
- knowledge-routingSkill
- lean-on-oss-standardsSkill
- live-money-disciplineSkill
- live-state-verificationSkill
- loop-governance-and-learningSkill
- low-level-executor-task-specSkill
- map-dispatch-over-conditionalsSkill
- merge-conflict-disciplineSkill
- mermaid-diagramsSkill
- oke-arc-runners-opentofuSkill
- orchestrate-agySkill
- orchestrate-claudeSkill
- orchestrate-codexSkill
- orchestrate-geminiSkill
- otel-emit-at-willSkill
- parameter-designSkill
- parse-dont-validateSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
When you pin a Pod to a particular node so it can share something node-local — most often a ReadWriteOnce PersistentVolume already mounted …
- Very specific: line 34
If you copy affinity/nodeSelector from another workload to colocate with it, copy that workload's tolerations in the same edit.
- Distinctive: line 62
Add a render/template test that fails the build when a manifest declares node-pinning without tolerations:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Colocated Pod Tolerations
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.
Why this is so easy to miss
- It is silent. A CronJob just produces
Failed/never-started runs; nothing crashes loudly. The pod template looks correct in review. - It can lie dormant. It works while the node is untainted, then breaks the day a taint is added (node pool migration, dedicating a node to a StatefulSet) — long after the manifest was written.
- Real incident: halt-recovery CronJobs were dead for ~46 hours because they co-located onto a tainted node without inheriting its tolerations. Every scheduled run silently failed; nobody was being recovered.
The rule
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: NoSchedulePrefer not to contend at all
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.
Make it a regression you cannot reship
Add a render/template test that fails the build when a manifest declares node-pinning without tolerations:
- Render the chart/manifests (
helm template,kustomize build, or your generator). - For every Pod-spec-bearing object, assert: if it has
podAffinity/nodeSelector/nodeAffinitytargeting a known tainted pool, it also has a toleration matching that pool's taint. - Fail the test otherwise.
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.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

