跳到主内容
智客 ZICQ

技能库 智客分类:安全测试 kubernetes-specialist

Kubernetes Specialist

在部署或管理Kubernetes工作量时使用。 启动创建部署清单,配置 pock 安全政策,建立服务账户,定义网络隔离规则,调试 pock 崩溃,分析资源限制,检查容器日志,或右大小工作量. 用于Helm图表,RBAC政策,网络政策,存储配置,性能优化,GitOps管道,多集群管理.

14785 安装量

官方网址:skills.sh

技能介绍

先看中文介绍;官方 description 原文单独保留,不改写 SKILL.md。

做什么

在部署或管理Kubernetes工作量时使用。 启动创建部署清单,配置 pock 安全政策,建立服务账户,定义网络隔离规则,调试 pock 崩溃,分析资源限制,检查容器日志,或右大小工作量. 用于Helm图表,RBAC政策,网络政策,存储配置,性能优化,GitOps管道,多集群管理.

何时用

这个技能

代理如何加载

按 Agent Skills 渐进披露:启动时只加载 name 与 description(约 100 token);任务匹配后才读入整份 SKILL.md 正文;scripts/、references/、assets/ 仅在需要时再读。 本文件正文结构:Kubernetes Specialist、When to Use This Skill、Core Workflow、Reference Guide、Constraints、MUST DO。 其中含规范建议的小节:分步指令。

文件分析

文件分析:除 SKILL.md 外,正文引用了 references/workloads.md、references/networking.md、references/configuration.md、references/storage.md、references/helm-charts.md、references/troubleshooting.md,属于带资源的技能包,这些文件按需再读。

官方 description(原文)

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.

Kubernetes SpecialistWhen to Use This SkillCore WorkflowReference GuideConstraintsMUST DOMUST NOT DOCommon YAML PatternsDeployment with resource limits, probes, and security contextMinimal RBAC (least privilege)NetworkPolicy (default-deny + explicit allow)Deny all ingress and egress by default

· 许可:MIT

来源分类:skills.sh agent-skill

SKILL.md 与 Agent 调用

官方规范 ↗
name
kubernetes-specialist
description
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.
许可
MIT
  1. 发现技能客户端向 Agent 提供名称与描述目录。
  2. 匹配与调用用户指定或任务匹配后,载入 SKILL.md 指令。
  3. 按需加载按步骤读取参考文档、使用脚本与素材。
指令中引用的文件 · 11
  • references/workloads.md
  • references/networking.md
  • references/configuration.md
  • references/storage.md
  • references/helm-charts.md
  • references/troubleshooting.md
  • references/custom-operators.md
  • references/service-mesh.md
  • references/gitops.md
  • references/cost-optimization.md
  • references/multi-cluster.md

以下路径提取自原文;文件是否齐全请以来源仓库中的完整目录为准。

具体调用语法与可用工具以目标 Agent 客户端为准。 查看调用机制说明 ↗

安装这个技能

Skills CLI ↗

先选择目标 Agent 和安装范围,保留技能包的附属文件,安装后检查客户端能否发现该技能。

该技能引用了附属文件,请从来源获取完整目录;仅复制 SKILL.md 可能缺少依赖。

交给 Agent 安装

复制安装指令给支持 Agent Skills 的代理,确认其中的目标目录与客户端匹配。

把 Agent Skill「kubernetes-specialist」安装到我的项目:SKILL.md 原文与官方 description 见 https://zicq.com/zh/skills/skl-a7d8a736029b22b8-%E5%BA%93%E8%B4%9D%E5%B0%94%E5%86%85%E5%85%B9%E4%B8%93%E5%AE%B6.html
请存为 .cursor/skills/kubernetes-specialist/SKILL.md 或 .claude/skills/kubernetes-specialist/SKILL.md,frontmatter 的 name 与 description 保持原样,不要改写。
该技能还带 scripts/、references/、assets/ 等文件,请从 https://github.com/jeffallan/claude-skills 取完整目录,不要只建一个 SKILL.md。

GitHub 完整包 ↗

终端安装 · Skills CLI

需要 Node.js 与 npx。先查看仓库技能列表,确认实际名称。

npx skills add 'https://github.com/jeffallan/claude-skills' --list

npx skills add 'https://github.com/jeffallan/claude-skills' --skill 'kubernetes-specialist'

CLI 会交互选择目标 Agent,默认安装到项目;用户级安装使用 -g。先通过查看命令核对仓库内容,再用 npx skills list 检查已安装技能。

阅读排版
--- name: kubernetes-specialist description: 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. license: MIT metadata: author: https://github.com/Jeffallan version: "1.1.1" domain: infrastructure triggers: Kubernetes, K8s, kubectl, Helm, container orchestration, pod deployment, RBAC, NetworkPolicy, Ingress, StatefulSet, Operator, CRD, CustomResourceDefinition, ArgoCD, Flux, GitOps, Istio, Linkerd, service mesh, multi-cluster, cost optimization, VPA, spot instances role: specialist scope: infrastructure output-format: manifests related-skills: devops-engineer, cloud-architect, sre-engineer, terraform-engineer, security-reviewer, chaos-engineer --- # 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 1. **Analyze requirements** — Understand workload characteristics, scaling needs, security requirements 2. **Design architecture** — Choose workload types, networking patterns, storage solutions 3. **Implement manifests** — Create declarative YAML with proper resource limits, health checks 4. **Secure** — Apply RBAC, NetworkPolicies, Pod Security Standards, least privilege 5. **Validate** — Run `kubectl rollout status`, `kubectl get pods -w`, and `kubectl describe pod ` to confirm health; roll back with `kubectl rollout undo` if 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 ```yaml 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"] envFrom: - secretRef: name: my-app-secret # pull credentials from Secret, not ConfigMap ``` ### Minimal RBAC (least privilege) ```yaml apiVersion: v1 kind: ServiceAccount metadata: name: my-app-sa namespace: my-namespace --- apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: name: my-app-role namespace: my-namespace rules: - apiGroups: [""] resources: ["configmaps"] verbs: ["get", "list"] # grant only what is needed --- apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: name: my-app-rolebinding namespace: my-namespace subjects: - kind: ServiceAccount name: my-app-sa namespace: my-namespace roleRef: kind: Role name: my-app-role apiGroup: rbac.authorization.k8s.io ``` ### NetworkPolicy (default-deny + explicit allow) ```yaml # Deny all ingress and egress by default apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: default-deny-all namespace: my-namespace spec: podSelector: {} policyTypes: ["Ingress", "Egress"] --- # Allow only specific traffic apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: allow-my-app namespace: my-namespace spec: podSelector: matchLabels: app: my-app policyTypes: ["Ingress"] ingress: - from: - podSelector: matchLabels: app: frontend ports: - protocol: TCP port: 8080 ``` ## Validation Commands After deploying, verify health and security posture: ```bash # Watch rollout complete kubectl rollout status deployment/my-app -n my-namespace # Stream pod events to catch crash loops or image pull errors kubectl get pods -n my-namespace -w # Inspect a specific pod for failures kubectl describe pod -n my-namespace # Check container logs kubectl logs -n my-namespace --previous # use --previous for crashed containers # Verify resource usage vs. limits kubectl top pods -n my-namespace # Audit RBAC permissions for a service account kubectl auth can-i --list --as=system:serviceaccount:my-namespace:my-app-sa # Roll back a failed deployment kubectl rollout undo deployment/my-app -n my-namespace ``` ## Output Templates When implementing Kubernetes resources, provide: 1. Complete YAML manifests with proper structure 2. RBAC configuration if needed (ServiceAccount, Role, RoleBinding) 3. NetworkPolicy for network isolation 4. Brief explanation of design decisions and security considerations [Documentation](https://jeffallan.github.io/claude-skills/skills/infrastructure/kubernetes-specialist/)

相关技能

安全测试

Skill Vetter

人工智能特工的安全第一技能审查。 在安装来自 ClawdHub, GitHub 或其他来源的任何技能之前使用 。 检查红旗,许可范围,可疑图案.

安全测试

Moltguard

MoltGuard——由OpenGuardrails担任OpenClaw保安. 安装 MoltGuard 以保护你和你的人类免受迅速注射、数据过滤和恶意命令的影响。 资料来源:https://github.com/openguardrails/openguardrails/tre…

安全测试

Security Auditor

用于审查安全漏洞代码,实施认证流,审计OWASP Top 10,配置CORS/CSP头,处理秘密,输入验证,SQL注射预防,XSS保护,或任何与安全相关的代码审查.

安全测试

Skill Vetter

安装任何AI代理技能前的安全审查协议. 红旗侦取入证盗取,疏通密码,放出. 风险分类:低/中/高/高。 编制结构化审查报告。 不先运行此功能, 绝不安装不信任的技能 .