Kubernetes checklist¶
Copy this list into a pull request, design review or project kickoff and tick what applies. Rules are grouped by level and sorted by score (criteria). Each links to the file that explains it and cites its sources. Automatable names tools that can check the rule in CI (see the file's "How to enforce" section).
Also apply the general checklist.
This file is generated by python3 scripts/rank.py fix from the guidelines. Don't edit it by hand.
Strongly recommended (9–10)¶
-
K8S-1(9) Give every container CPU and memory requests and a memory limit. Set CPU limits only where needed, for example on sensitive workloads. (specific/kubernetes) Automatable: kube-linter checks, Kyverno policy library, OPA Gatekeeper library, Polaris checks. -
K8S-2(9) Configure readiness, liveness and startup probes for their distinct purposes. (specific/kubernetes) Automatable: kube-linter checks, Kyverno policy library, OPA Gatekeeper library, Polaris checks. -
K8S-8(9) Grant least-privilege RBAC, and give each workload its own service account. (specific/kubernetes) Automatable: kube-linter checks, Polaris checks.
Recommended (6–8)¶
-
K8S-4(8) Run multiple replicas, spread them across nodes and zones, and protect them with PodDisruptionBudgets. (specific/kubernetes) Automatable: kube-linter checks, Kyverno policy library, Polaris checks. -
K8S-5(8) Deploy images by digest, never by a mutable tag such as:latest. (specific/kubernetes) Automatable: kube-linter checks, OPA Gatekeeper library, Polaris checks. -
K8S-9(8) Enforce the Restricted Pod Security Standard for application namespaces. (specific/kubernetes) Automatable: Pod Security Admission. -
K8S-10(8) Start each namespace from a default-deny NetworkPolicy and allow only the traffic you need. (specific/kubernetes) Automatable: kube-linter checks, Kyverno policy library. -
K8S-11(8) Encrypt Secrets at rest, restrict who can read them, and consider an external secret store. (specific/kubernetes) Automatable: kube-linter checks. -
K8S-3(7) Fit graceful shutdown into the Pod's termination grace period: setterminationGracePeriodSecondsto cover your slowest shutdown, and use apreStophook if the app needs time before it receivesSIGTERM. (specific/kubernetes) -
K8S-13(6) Let an agent pull the declared state from Git and continuously reconcile the cluster to it (GitOps). (specific/kubernetes)
Conditional (1–5)¶
-
K8S-6(5) Scale stateless workloads horizontally with the HorizontalPodAutoscaler. (specific/kubernetes) -
K8S-12(5) Decide your tenancy model (namespaces, clusters) explicitly. (specific/kubernetes) -
K8S-7(4) Apply the recommendedapp.kubernetes.io/*labels. (specific/kubernetes) Automatable: Kyverno policy library.