kubernetes-manifest-author
Skill22 starsChanged 2 months agoMITView on GitHub
Authors production-grade Kubernetes manifests — Deployments, Services, Ingress, probes, resource requests/limits, security contexts, and ConfigMaps/Secrets wiring — following hardening and reliability best practices. Use this skill when the user asks to "write a Kubernetes deployment", "create a k8s manifest", "add liveness/readiness probes", "set resource limits", "harden a pod securityContext", "expose a service", "write a HorizontalPodAutoscaler", or otherwise produce or review YAML for deploying workloads to Kubernetes.
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 2 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 23
Author the workload manifest: Start from templates/deployment.yaml.
- Very specific: line 25
Add the Service: Use templates/service.yaml.
- Very specific: line 31
Validate: Run scripts/validate_manifest.py to catch the most common production mistakes (missing limits, :latest, root user, no probes, …
- Distinctive: line 59
Every production Pod should set, at the container level unless noted:
- Very specific: line 83
Use the recommended common labels (app.kubernetes.io/*) so Services, HPAs, and dashboards select consistently.
- Distinctive: line 85
Keep liveness probes dependency-free.
- Very specific: line 86
Prefer RollingUpdate with maxUnavailable: 0 for zero-downtime when you have spare capacity.
- Very specific: line 88
Run scripts/validate_manifest.py before shipping.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 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
Kubernetes Manifest Author
Overview
Produce correct, secure, and reliable Kubernetes YAML for deploying stateless and stateful workloads. This skill turns an application description into a complete manifest set: workload (Deployment/StatefulSet/CronJob), Service, optional Ingress, probes, resource governance, security context hardening, and configuration wiring.
Keywords: kubernetes, k8s, manifest, yaml, deployment, statefulset, service, ingress, liveness probe, readiness probe, startup probe, resources requests limits, securityContext, runAsNonRoot, podSecurityStandards, HPA, autoscaling, ConfigMap, Secret, PodDisruptionBudget, rollout, kubectl, helm, kustomize.
This skill is opinionated toward the restricted Pod Security Standard and production SRE defaults. Loosen only when the user has a concrete reason.
Workflow
- Gather the workload shape. Determine: container image + tag (never
:latest), listening port(s), stateless vs stateful, replica count, environment/config inputs, secrets, and exposure (cluster-internal, Ingress, LoadBalancer). If the user omits something, apply the safe defaults inreferences/best-practices.mdand state the assumption. - Pick the workload kind using the decision table below. Most web/API services are
Deployment. - Author the workload manifest. Start from
templates/deployment.yaml. Always fill in: explicit labels, image with pinned tag, resource requests AND limits, all three probe types where appropriate, a hardenedsecurityContext, and aRollingUpdatestrategy. - Add the Service. Use
templates/service.yaml. Matchselectorto the Pod template labels exactly. Default toClusterIP; useLoadBalancer/NodePortonly when externally requested. - Add exposure and resilience extras as needed: Ingress, HorizontalPodAutoscaler, PodDisruptionBudget, ConfigMap/Secret. See
references/resource-catalog.md. - Wire configuration. Inject config via
envFrom/env(ConfigMap) and secrets viasecretKeyRefor mounted volumes. Never hardcode secrets in the manifest. - Validate. Run
scripts/validate_manifest.pyto catch the most common production mistakes (missing limits,:latest, root user, no probes, mismatched selectors). Ifkubectlis available, also runkubectl apply --dry-run=serverandkubectl explainfor field checks. - Explain the manifest to the user: label the security/reliability choices you made and what they should tune (resource numbers, replica count, probe paths).
Decision Framework — which workload kind?
| Situation | Kind |
| Stateless HTTP/gRPC API or web app | Deployment |
| Needs stable network identity / ordered start / per-pod storage (DBs, Kafka) | StatefulSet |
| One pod per node (log/metrics agents, CNI) | DaemonSet |
| Run-to-completion task | Job |
| Scheduled run-to-completion task | CronJob |
Probe decision framework
Probes are the most common source of production incidents. Apply this:
- readinessProbe — ALWAYS for anything in a Service. Gates traffic; failing readiness removes the pod from endpoints without restarting it. Should check that dependencies (DB, cache) the pod needs to serve are reachable.
- livenessProbe — only when the app can deadlock in a way a restart fixes. Make it CHEAP and dependency-free (it should NOT check the database — a DB outage shouldn't restart every pod). A bad liveness probe causes restart storms.
- startupProbe — for slow-starting apps (JVM, migrations). Disables liveness/readiness until the app has booted, so you can keep liveness aggressive without killing slow boots.
Probe handler choice: prefer httpGet for HTTP servers, grpc for gRPC, exec only as a last resort (forks a process each check).
See worked numbers and timing math in references/best-practices.md.
Security context checklist (restricted PSS)
Every production Pod should set, at the container level unless noted:
securityContext:
runAsNonRoot: true
runAsUser: 10001 # any non-zero UID
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop: ["ALL"]
seccompProfile: # pod-level also acceptable
type: RuntimeDefaultreadOnlyRootFilesystem: true requires mounting emptyDir volumes for any writable paths (e.g. /tmp, cache dirs). The template shows this pattern.
Worked example
See examples/web-api.md for a full request → manifest walkthrough: a Node.js API with config, secrets, an HPA, a PDB, and an Ingress — including the reasoning for every non-default field.
Best Practices
- Pin image tags (or digests); set
imagePullPolicy: IfNotPresentfor pinned tags. - Set resource requests (for scheduling/QoS) AND limits (to cap blast radius). Set CPU request = limit only when you need predictable latency; otherwise omit the CPU limit to avoid throttling (see reference).
- Use the recommended common labels (
app.kubernetes.io/*) so Services, HPAs, and dashboards select consistently. - Minimum 2 replicas + a PodDisruptionBudget for any service that must stay up during node drains.
- Keep liveness probes dependency-free; put dependency checks in readiness.
- Prefer
RollingUpdatewithmaxUnavailable: 0for zero-downtime when you have spare capacity. - One concern per manifest file; order resources so dependencies (ConfigMap, Secret) come before consumers, or use separate files applied together.
- Run
scripts/validate_manifest.pybefore shipping.
Common Pitfalls
:latesttags — non-reproducible rollouts and no rollback guarantee.- No resource limits — one pod can starve a node; pods get
BestEffortQoS and are evicted first. - Liveness probe checking the database — turns a dependency outage into a cluster-wide restart storm.
- Selector/label mismatch — Service routes to nothing;
kubectl get endpointsis empty. - Running as root — blocked by restricted PSS; an escape is far more dangerous.
readOnlyRootFilesystem: truewithout writableemptyDirmounts — app crashes trying to write/tmp.- Aggressive
initialDelaySecondson liveness for slow apps — use astartupProbeinstead. - Single replica +
maxUnavailable: 1— guaranteed downtime on every rollout and node drain.
Other versions2 projects use a version of this.
Word for word · 2
- JayRHa/agent-skills★ 12100% same
- JayRHa/AgentSkills★ 12100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository194 other files it gives its agents.
- 0-templateSkill
- ab-test-analyzerSkill
- academy-guideSkill
- add-to-my-skillsSkill
- adr-authorSkill
- ai-tools-setupSkill
- algorithmic-artSkill
- api-and-interface-designSkill
- api-designerSkill
- api-docs-writerSkill
- apple-store-submitSkill
- aws-cost-optimizerSkill
- bash-script-hardeningSkill
- blog-post-writerSkill
- book-summarizerSkill
- branch-cleanupSkill
- brand-copy-landingSkill
- brand-copySkill
- brand-designSkill
- brand-guidelinesSkill
- browser-testing-with-devtoolsSkill
- canvas-designSkill
- changelog-generatorSkill
- changelog-keeperSkill
- chart-chooserSkill
- ci-cd-and-automationSkill
- ci-fix-loopSkill
- claude-apiSkill
- cloudflare-block-countriesSkill
- coderabbitloopSkill
- code-review-and-qualitySkill
- code-reviewerSkill
- code-simplificationSkill
- codexloopSkill
- comms-notionSkill
- comms-slackSkill
- comms-whatsappSkill
- competitive-analysisSkill
- concept-explainerSkill
- constraint-driven-developmentSkill
- context-engineeringSkill
- context-repoSkill
- cover-letter-writerSkill
- crash-courseSkill
- cron-schedulerSkill
- data-digestSkill
- data-pipeline-architectSkill
- debug-detectiveSkill
- debugging-and-error-recoverySkill
- decision-matrixSkill
- dependabot-triageSkill
- dependency-upgraderSkill
- deprecation-and-migrationSkill
- dev-instantdbSkill
- discernment-nudgeSkill
- doc-coauthoringSkill
- dockerfile-proSkill
- docs-index-keeperSkill
- documentation-and-adrsSkill
- docxSkill
- The first 60 shown.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

