Ревью манифестов Kubernetes
Проверяет манифесты Kubernetes и Helm values: ресурсы, пробы, securityContext, теги образов, PodDisruptionBudget, стратегию выкатки. Используйте при написании или ревью K8s YAML и чартов.
kubernetes-manifest-reviewУстановка
Выполните одну команду — она сохранит SKILL.md в папку скиллов агента. Перезапустите агента, и он подхватит скилл сам.
mkdir -p ~/.claude/skills/kubernetes-manifest-review && curl -fsSL https://anymodel.org/en/skills/devops/kubernetes-manifest-review/SKILL.md -o ~/.claude/skills/kubernetes-manifest-review/SKILL.md
mkdir -p ~/.agents/skills/kubernetes-manifest-review && curl -fsSL https://anymodel.org/en/skills/devops/kubernetes-manifest-review/SKILL.md -o ~/.agents/skills/kubernetes-manifest-review/SKILL.md
New-Item -ItemType Directory -Force "$HOME\.claude\skills\kubernetes-manifest-review" | Out-Null; Invoke-WebRequest https://anymodel.org/en/skills/devops/kubernetes-manifest-review/SKILL.md -UseBasicParsing -OutFile "$HOME\.claude\skills\kubernetes-manifest-review\SKILL.md"
New-Item -ItemType Directory -Force "$HOME\.agents\skills\kubernetes-manifest-review" | Out-Null; Invoke-WebRequest https://anymodel.org/en/skills/devops/kubernetes-manifest-review/SKILL.md -UseBasicParsing -OutFile "$HOME\.agents\skills\kubernetes-manifest-review\SKILL.md"
Другой агент: сохраните файл в его папку скиллов или дайте ему ссылку на файл: https://anymodel.org/en/skills/devops/kubernetes-manifest-review/SKILL.md
SKILL.md
Kubernetes Manifest Review
Review Deployments, StatefulSets, Services, Ingresses and Helm values for production readiness. Read all manifests of the app together (workload, service, config, PDB, HPA, network policy) before judging any one of them.
Workflow
- Locate manifests (
k8s/,deploy/,charts/, kustomize overlays). If Helm, render first:helm template <release> <chart> -f values.yaml. - Run through the checklist and note each finding with
kind/name, field path and severity. - Fix with minimal edits that keep the existing structure (kustomize patches, values keys).
- Verify against the cluster in read-only mode (see Verification). Never
kubectl applyordeletewithout the user's explicit confirmation, and confirm which cluster and namespace the current context points to.
Checklist
Image
- Tag is a specific version or digest, never
latestor an omitted tag. imagePullPolicymatches:IfNotPresentfor immutable tags,Alwaysonly if tags are mutable.imagePullSecretsset for private registries.
Resources
- Every container has
resources.requestsfor cpu and memory, and a memorylimitsvalue. Treat a CPU limit as optional and discuss throttling with the user before adding one. - Memory request should be close to the limit for predictable scheduling; check the numbers against actual usage if metrics are available (
kubectl top pod). - Set the JVM/Node heap flags relative to the memory limit.
Probes
readinessProbegates traffic;livenessProberestarts stuck processes;startupProbeprotects slow starts.- Liveness must not depend on external services (database, other pods), otherwise an outage causes a restart storm.
- Set sensible
initialDelaySeconds,periodSeconds,timeoutSeconds,failureThreshold. Probe paths must exist in the app.
securityContext
- Pod level:
runAsNonRoot: true,runAsUsernumeric,seccompProfile: {type: RuntimeDefault},fsGroupif volumes are written. - Container level:
allowPrivilegeEscalation: false,readOnlyRootFilesystem: true(addemptyDirmounts for/tmpand cache dirs),capabilities: {drop: ["ALL"]}. - No
privileged: true,hostNetwork,hostPathunless the user explains why. automountServiceAccountToken: falsewhen the pod does not call the API; use a dedicated ServiceAccount.
Availability and rollout
replicas >= 2for anything user-facing; spread withtopologySpreadConstraintsor pod anti-affinity.- Add a
PodDisruptionBudget(minAvailableormaxUnavailable) so node drains do not take the service down. - Deployment strategy:
RollingUpdatewithmaxUnavailable: 0andmaxSurge: 1for zero-downtime;minReadySecondsif needed. StatefulSets need an update strategy that fits the data store. - Add a
preStopsleep andterminationGracePeriodSecondslong enough to drain connections. - HPA targets must reference requests that exist.
Config and secrets
- Secrets come from
Secretobjects or an external secret operator, not plainenv: value:in the manifest. - Never put secret values into ConfigMaps, Helm values committed to git, or labels/annotations.
- Mount config as files or use
envFrom; changing a ConfigMap does not restart pods by itself, so check for a checksum annotation or reloader.
Networking and labels
- Service selector matches pod labels exactly; ports and
targetPortnames line up. - Consistent
app.kubernetes.io/*labels. ANetworkPolicyexists when the cluster enforces them. - Ingress has TLS and a sensible body-size/timeout configuration where the controller needs one.
Verification
kubectl config current-context
kubectl diff -f manifest.yaml # read-only, shows what would change
kubectl apply --dry-run=server -f manifest.yaml # schema and admission check
kubectl auth can-i create deployments -n <ns>
helm lint ./chart && helm template r ./chart | kubectl apply --dry-run=server -f -
If kubeconform, kube-linter or kubescape are installed, run them and include the output summary.
Output format
Report:
- Findings table:
severity | resource | field | problem | recommended change. - The edited manifests or a diff.
- Results of diff and dry-run, with the cluster context used.
- Open questions for the user (real resource usage, expected traffic, compliance needs).
Pitfalls
- Do not add a CPU limit or tight memory limit blindly; it can cause throttling or OOM kills. Ask for real usage data.
readOnlyRootFilesystembreaks apps that write to disk; test it and add writable volumes.- Do not change
selectorof an existing Deployment; the field is immutable. - Do not rename PVCs or StatefulSet volume templates; that orphans data.
- Never run
kubectl delete,scale 0orrollout restarton a shared cluster without confirmation.
Source: AnyModel skills catalog · License: CC BY 4.0
Подключить через AnyModel API
Скилл работает на той модели, которую использует агент. Подключите Claude Code, Codex или Cursor к AnyModel и запускайте его на Claude, GPT, Gemini и других моделях по одному ключу — оплата за токены, без подписки.
AnyModel