/polymath-kubernetes:write-manifestfrom polymath-kubernetes
Write a Kubernetes Deployment + Service + PDB manifest with safe defaults — resource requests/limits, probes, security context, topology spread.
Ships in polymath-kubernetes. 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.
Read when SKILL.md points to them.
Author a Kubernetes manifest set that runs safely from day one.
Mode: analytical — judgment inside a fixed frame. Keep the output shape; every verdict cites its evidence; unknowns are marked [TBD] or [VERIFY], never filled in.
Deployment + Service + PodDisruptionBudget. Add HorizontalPodAutoscaler only when you have a metric to scale on; otherwise it's noise.requests.cpu controls scheduling.requests.memory controls scheduling.limits.memory — set equal to or slightly above requests (CPU limits are usually counterproductive for latency-sensitive workloads).readinessProbe — gate traffic. Fail-fast so unhealthy pods are removed from endpoints.livenessProbe — restart on hang. Use a separate, very cheap endpoint or omit; restarting under load can amplify outages.startupProbe — for slow boots; lets liveness/readiness use shorter intervals.runAsNonRoot: true, runAsUser: 65532 (or workload-specific).readOnlyRootFilesystem: true + an emptyDir mounted wherever the app writes (at least /tmp) — without it many runtimes crash on start.automountServiceAccountToken: false unless the workload calls the Kubernetes API.allowPrivilegeEscalation: false, capabilities.drop: [ALL].seccompProfile.type: RuntimeDefault.minAvailable: 1 or maxUnavailable: 25%, sized to allow node upgrades.topologySpreadConstraints with whenUnsatisfiable: ScheduleAnyway.app.kubernetes.io/name, app.kubernetes.io/instance, owner team, source repo annotation.terminationGracePeriodSeconds (default 30s); add a short preStop sleep only if endpoints lag behind pod termination in your cluster.image@sha256:…) for production; a mutable tag can change under a running Deployment.apiVersion: apps/v1
kind: Deployment
metadata:
name: refund
namespace: payments
labels:
app.kubernetes.io/name: refund
app.kubernetes.io/instance: refund
spec:
replicas: 3
selector:
matchLabels:
app.kubernetes.io/name: refund
template:
metadata:
labels:
app.kubernetes.io/name: refund
spec:
automountServiceAccountToken: false
securityContext:
runAsNonRoot: true
runAsUser: 65532
seccompProfile:
type: RuntimeDefault
topologySpreadConstraints:
- maxSkew: 1
topologyKey: topology.kubernetes.io/zone
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
app.kubernetes.io/name: refund
volumes:
- name: tmp
emptyDir: {}
containers:
- name: refund
image: example/refund:0.1.0@sha256:<digest>
ports:
- containerPort: 8080
name: http
readinessProbe:
httpGet: { path: /healthz, port: http }
periodSeconds: 5
timeoutSeconds: 1
startupProbe:
httpGet: { path: /healthz, port: http }
failureThreshold: 30
periodSeconds: 2
resources:
requests: { cpu: 100m, memory: 128Mi }
limits: { memory: 256Mi }
volumeMounts:
- name: tmp
mountPath: /tmp
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities: { drop: [ALL] }
---
apiVersion: v1
kind: Service
metadata:
name: refund
namespace: payments
spec:
selector:
app.kubernetes.io/name: refund
ports:
- name: http
port: 80
targetPort: http
---
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: refund
namespace: payments
spec:
minAvailable: 1
selector:
matchLabels:
app.kubernetes.io/name: refund
requests.cpu and requests.memory set.runAsNonRoot: true + readOnlyRootFilesystem: true.readinessProbe defined.PodDisruptionBudget exists.app.kubernetes.io/* set.livenessProbe that hits the same heavy endpoint as readinessProbe.securityContext defaults to root + writable rootfs.What SKILL.md sets; muted values are Claude Code's defaults
3 skills in this plugin
/audit-rbac-grantsAudit RBAC roles and bindings — find overbroad verbs (*), cluster-wide grants that should be namespaced, stale ServiceAccounts, anonymous access./propose-pod-security-standardsPropose Kubernetes Pod Security Standards (privileged/baseline/restricted) per namespace; identify violating workloads and remediations.Other plugins' skills for the same job
npx claudepluginhub mohammadbafkar/polymath --plugin polymath-kubernetes