kubernetes-specialist
它能做什么
它指导 AI 智能体在 Kubernetes 集群上部署和管理应用。适用于在生产环境中运行容器的 DevOps 工程师和开发者。
适用场景
- ✓当你需要编写 Kubernetes 部署、服务或 StatefulSet 时。
- ✓当某个 Pod 不断崩溃,或工作负载需要调整资源限制时。
- ✓当你想设置网络隔离、RBAC 规则或 Helm 图表时。
技能链接
https://github.com/Jeffallan/claude-skills/blob/main/skills/kubernetes-specialist/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我的 Pod 一直因 OOMKilled 崩溃。请找出原因并修正资源限制。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会检查工作负载及其日志,编写带有资源限制和健康检查的清单并应用。然后,它检查发布状态,必要时用命令回滚。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Kubernetes Specialist
When to Use This Skill
- Deploying workloads (Deployments, StatefulSets, DaemonSets, Jobs)
- Configuring networking (Services, Ingress, NetworkPolicies)
- Managing configuration (ConfigMaps, Secrets, environment variables)
- Setting up persistent storage (PV, PVC, StorageClasses)
- Creating Helm charts for application packaging
- Troubleshooting cluster and workload issues
- Implementing security best practices
Core Workflow
- Analyze requirements — Understand workload characteristics, scaling needs, security requirements
- Design architecture — Choose workload types, networking patterns, storage solutions
- Implement manifests — Create declarative YAML with proper resource limits, health checks
- Secure — Apply RBAC, NetworkPolicies, Pod Security Standards, least privilege
- Validate — Run
kubectl rollout status,kubectl get pods -w, andkubectl describe pod <name>to confirm health; roll back withkubectl rollout undoif needed
Reference Guide
Load detailed guidance based on context:
| Topic | Reference | Load When |
|---|---|---|
| Workloads | references/workloads.md |
Deployments, StatefulSets, DaemonSets, Jobs, CronJobs |
| Networking | references/networking.md |
Services, Ingress, NetworkPolicies, DNS |
| Configuration | references/configuration.md |
ConfigMaps, Secrets, environment variables |
| Storage | references/storage.md |
PV, PVC, StorageClasses, CSI drivers |
| Helm Charts | references/helm-charts.md |
Chart structure, values, templates, hooks, testing, repositories |
| Troubleshooting | references/troubleshooting.md |
kubectl debug, logs, events, common issues |
| Custom Operators | references/custom-operators.md |
CRD, Operator SDK, controller-runtime, reconciliation |
| Service Mesh | references/service-mesh.md |
Istio, Linkerd, traffic management, mTLS, canary |
| GitOps | references/gitops.md |
ArgoCD, Flux, progressive delivery, sealed secrets |
| Cost Optimization | references/cost-optimization.md |
VPA, HPA tuning, spot instances, quotas, right-sizing |
| Multi-Cluster | references/multi-cluster.md |
Cluster API, federation, cross-cluster networking, DR |
Constraints
MUST DO
- Use declarative YAML manifests (avoid imperative kubectl commands)
- Set resource requests and limits on all containers
- Include liveness and readiness probes
- Use secrets for sensitive data (never hardcode credentials)
- Apply least privilege RBAC permissions
- Implement NetworkPolicies for network segmentation
- Use namespaces for logical isolation
- Label resources consistently for organization
- Document configuration decisions in annotations
MUST NOT DO
- Deploy to production without resource limits
- Store secrets in ConfigMaps or as plain environment variables
- Use default ServiceAccount for application pods
- Allow unrestricted network access (default allow-all)
- Run containers as root without justification
- Skip health checks (liveness/readiness probes)
- Use latest tag for production images
- Expose unnecessary ports or services
Common YAML Patterns
Deployment with resource limits, probes, and security context
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-app
namespace: my-namespace
labels:
app: my-app
version: "1.2.3"
spec:
replicas: 3
selector:
matchLabels:
app: my-app
template:
metadata:
labels:
app: my-app
version: "1.2.3"
spec:
serviceAccountName: my-app-sa # never use default SA
securityContext:
runAsNonRoot: true
runAsUser: 1000
fsGroup: 2000
containers:
- name: my-app
image: my-registry/my-app:1.2.3 # never use latest
ports:
- containerPort: 8080
resources:
requests:
cpu: "100m"
memory: "128Mi"
limits:
cpu: "500m"
memory: "512Mi"
livenessProbe:
httpGet:
path: /healthz
port: 8080
initialDelaySeconds: 15
periodSeconds: 20
readinessProbe:
httpGet:
path: /ready
port: 8080
initialDelaySeconds: 5
periodSeconds: 10
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop: ["ALL
常见问题
它涵盖 Helm 吗?
涵盖。它涵盖用于打包应用的 Helm 图表。
它如何检查部署?
它运行 kubectl rollout status 并检查 Pod 详情,也可以用 kubectl rollout undo 回滚。
它涵盖安全吗?
涵盖。它涵盖 RBAC 策略、NetworkPolicy 和 Pod 安全标准。
详情
作者的原始描述
Use when deploying or managing Kubernetes workloads. Invoke to create deployment manifests, configure pod security policies, set up service accounts, define network isolation rules, debug pod crashes, analyze resource limits, inspect container logs, or right-size workloads. Use for Helm charts, RBAC policies, NetworkPolicies, storage configuration, performance optimization, GitOps pipelines, and multi-cluster management.
repo: Jeffallan/claude-skills
热度
- GitHub 星标
- 12k
- 排名
- #11433
- 许可证
- MIT
- 更新时间
- 2026/10/30
评论
- …
同一仓库的更多技能
angular-architect
12k帮你的智能体构建 Angular 17 及更新版本的应用,包括独立组件、懒加载路由、NgRx 状态管理、RxJS 模式和性能优化。
api-designer
12k帮你的智能体设计 REST 或 GraphQL API,并编写 OpenAPI 3.1 规范,包括资源、分页、错误格式和版本控制规则。
architecture-designer
12k帮你的智能体设计系统架构、比较模式和技术,并编写架构决策记录,解释每个选择的理由。
atlassian-mcp
12k帮你的智能体通过 MCP 搜索和更新 Jira 问题及 Confluence 页面,包括 JQL 和 CQL 查询、冲刺和文档同步。