用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/kmshihab7878/claude-code-setup --skill kubernetes-deployment-specification命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | Kubernetes Deployment Specification |
| description | Reference for Kubernetes Deployment fields, patterns, and troubleshooting. |
Comprehensive reference for Kubernetes Deployment resources, covering all key fields, best practices, and common patterns.
A Deployment provides declarative updates for Pods and ReplicaSets. It manages the desired state of your application, handling rollouts, rollbacks, and scaling operations.
Deployment manifest.RollingUpdate vs Recreate) and its parameters.revisionHistoryLimit.ImagePullBackOff, CrashLoopBackOff, stuck rollouts).The detailed reference material lives behind pointers so an invocation loads only what it needs.
| When | Read |
|---|---|
You need a complete annotated Deployment manifest (all fields in one place) | references/complete-spec.md |
| You need detail on a specific field group | references/field-reference.md |
| You're picking a deployment pattern (HA, sidecar, init container) | references/patterns.md |
| A Deployment is misbehaving | references/troubleshooting.md |
| Group | Covers | See |
|---|---|---|
| Metadata fields | required (name, labels selector parity) + recommended labels/annotations (app.kubernetes.io/*) | field-reference.md |
| Replica management | replicas, revisionHistoryLimit, selectors | field-reference.md |
| Update strategy | RollingUpdate vs Recreate, maxSurge, maxUnavailable, minReadySeconds, progressDeadlineSeconds | field-reference.md |
| Pod template | template.metadata, labels parity with selector | field-reference.md |
| Container configuration | image, ports, env, envFrom, command/args | field-reference.md |
| Resource management | resources.requests + resources.limits for cpu/memory; QoS tiers | field-reference.md |
| Health checks | startupProbe, livenessProbe, readinessProbe; HTTP / TCP / exec / gRPC |
replicas: 3+, maxUnavailable: 0, pod anti-affinity by hostname.emptyDir volume.Full YAML for each pattern: references/patterns.md.
:latest).>= 3 for HA.maxUnavailable: 0 for zero-downtime).preStop hook, terminationGracePeriodSeconds).revisionHistoryLimit for rollback capability.Fast startup:
spec:
minReadySeconds: 5
strategy:
rollingUpdate:
maxSurge: 2
maxUnavailable: 1
Zero-downtime updates:
spec:
minReadySeconds: 10
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
Graceful shutdown:
spec:
template:
spec:
terminationGracePeriodSeconds: 60
containers:
- name: app
lifecycle:
preStop:
exec:
command: ["/bin/sh", "-c", "sleep 15 && kill -SIGTERM 1"]
Common failure modes — load the full catalog in references/troubleshooting.md when diagnosing:
kubectl describe deployment <name>, then drill into the failing pod (get pods -l app=<app>, describe pod, logs).ImagePullBackOff — wrong image name/tag, missing imagePullSecrets, registry credentials.CrashLoopBackOff — application crashes, overly aggressive liveness probe, resource limits, missing dependencies.progressDeadlineSeconds exceeded, readiness probe never succeeds, cluster resource pressure.field-reference.md| Security context | non-root, read-only filesystem, drop capabilities, seccomp | field-reference.md |
| Volumes | configMap, secret, emptyDir, persistentVolumeClaim, projected | field-reference.md |
| Scheduling | nodeSelector, node affinity, pod (anti-)affinity, tolerations, topology-spread | field-reference.md |