Kubernetes Deploy Manifest Review
When to use
Invoke when shipping a workload to Kubernetes for the first time, when the workload's manifests are being changed materially, or when reviewing inherited manifests for production-readiness. Do not invoke for non-Kubernetes deployments.
Inputs
- Container image reference (registry + tag/digest).
- Workload type (stateless service assumed; stateful workloads need extra design).
- Replica count, expected resource usage (CPU/memory), HPA targets.
- Network model: which namespaces and external services this workload may reach.
Output contract
Generated or reviewed manifests MUST conform to:
- deployment-standards — rolling update default; tier-0 services require canary or blue-green; readiness/liveness probes mandatory; rollback artifact declared.
- security-standards —
runAsNonRoot: true,readOnlyRootFilesystem: true,allowPrivilegeEscalation: false, drop ALL capabilities, NetworkPolicy by default, ServiceAccount scoping (not the default SA). - observability-standards — Prometheus scrape annotations or a ServiceMonitor; logs to stdout.
- naming-conventions — resource names
kebab-case, suffixed by kind when ambiguous. - Tier classification from architecture-schema drives PDB requirements and replica defaults.
Process
- Author or review
Deployment:replicasset;strategy: RollingUpdatewithmaxSurge: 1, maxUnavailable: 0.imagePullPolicy: IfNotPresent; image pinned by digest when possible.resources.requestsANDresources.limitsset on every container.securityContext:runAsNonRoot: true,readOnlyRootFilesystem: true,allowPrivilegeEscalation: false,capabilities: { drop: [ALL] }.- Probes:
startupProbe(slow start),readinessProbe(gate traffic),livenessProbe(restart on hang). They must be distinct.
- Author
Service(ClusterIP unless explicitly external). - Author
HorizontalPodAutoscalerwith min/max replicas and target metrics. - Author
PodDisruptionBudgetwhen replicas > 1 (minAvailable: 1ormaxUnavailable: 1). - Author
NetworkPolicywith default-deny ingress; allow only required peers. - Author dedicated
ServiceAccount(no use ofdefault); bind only required RBAC. - If reviewing existing manifests, produce
findings.mdcategorized Blocker / High / Medium / Low. - Emit the manifest set under
k8s/plus adeploy.mdsummarizing the rollout strategy and rollback procedure.
Outputs
k8s/deployment.yaml,service.yaml,hpa.yaml,pdb.yaml,networkpolicy.yaml,serviceaccount.yaml.deploy.md(rollout + rollback).findings.mdwhen reviewing existing manifests.
Quality checks
- Every container has both
requestsandlimitsset. -
startupProbe,readinessProbe, andlivenessProbeare distinct. -
runAsNonRoot: true,readOnlyRootFilesystem: true, all capabilities dropped. -
NetworkPolicydenies by default and lists only required peers. -
PodDisruptionBudgetexists for any workload with replicas > 1. - No use of the
defaultServiceAccount.
References
(None in v0.1.)