$npx -y skills add Jeffallan/claude-skills --skill kubernetes-specialistUse 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 f
| 1 | # Kubernetes Specialist |
| 2 | |
| 3 | ## When to Use This Skill |
| 4 | |
| 5 | - Deploying workloads (Deployments, StatefulSets, DaemonSets, Jobs) |
| 6 | - Configuring networking (Services, Ingress, NetworkPolicies) |
| 7 | - Managing configuration (ConfigMaps, Secrets, environment variables) |
| 8 | - Setting up persistent storage (PV, PVC, StorageClasses) |
| 9 | - Creating Helm charts for application packaging |
| 10 | - Troubleshooting cluster and workload issues |
| 11 | - Implementing security best practices |
| 12 | |
| 13 | ## Core Workflow |
| 14 | |
| 15 | 1. **Analyze requirements** — Understand workload characteristics, scaling needs, security requirements |
| 16 | 2. **Design architecture** — Choose workload types, networking patterns, storage solutions |
| 17 | 3. **Implement manifests** — Create declarative YAML with proper resource limits, health checks |
| 18 | 4. **Secure** — Apply RBAC, NetworkPolicies, Pod Security Standards, least privilege |
| 19 | 5. **Validate** — Run `kubectl rollout status`, `kubectl get pods -w`, and `kubectl describe pod <name>` to confirm health; roll back with `kubectl rollout undo` if needed |
| 20 | |
| 21 | ## Reference Guide |
| 22 | |
| 23 | Load detailed guidance based on context: |
| 24 | |
| 25 | | Topic | Reference | Load When | |
| 26 | |-------|-----------|-----------| |
| 27 | | Workloads | `references/workloads.md` | Deployments, StatefulSets, DaemonSets, Jobs, CronJobs | |
| 28 | | Networking | `references/networking.md` | Services, Ingress, NetworkPolicies, DNS | |
| 29 | | Configuration | `references/configuration.md` | ConfigMaps, Secrets, environment variables | |
| 30 | | Storage | `references/storage.md` | PV, PVC, StorageClasses, CSI drivers | |
| 31 | | Helm Charts | `references/helm-charts.md` | Chart structure, values, templates, hooks, testing, repositories | |
| 32 | | Troubleshooting | `references/troubleshooting.md` | kubectl debug, logs, events, common issues | |
| 33 | | Custom Operators | `references/custom-operators.md` | CRD, Operator SDK, controller-runtime, reconciliation | |
| 34 | | Service Mesh | `references/service-mesh.md` | Istio, Linkerd, traffic management, mTLS, canary | |
| 35 | | GitOps | `references/gitops.md` | ArgoCD, Flux, progressive delivery, sealed secrets | |
| 36 | | Cost Optimization | `references/cost-optimization.md` | VPA, HPA tuning, spot instances, quotas, right-sizing | |
| 37 | | Multi-Cluster | `references/multi-cluster.md` | Cluster API, federation, cross-cluster networking, DR | |
| 38 | |
| 39 | ## Constraints |
| 40 | |
| 41 | ### MUST DO |
| 42 | - Use declarative YAML manifests (avoid imperative kubectl commands) |
| 43 | - Set resource requests and limits on all containers |
| 44 | - Include liveness and readiness probes |
| 45 | - Use secrets for sensitive data (never hardcode credentials) |
| 46 | - Apply least privilege RBAC permissions |
| 47 | - Implement NetworkPolicies for network segmentation |
| 48 | - Use namespaces for logical isolation |
| 49 | - Label resources consistently for organization |
| 50 | - Document configuration decisions in annotations |
| 51 | |
| 52 | ### MUST NOT DO |
| 53 | - Deploy to production without resource limits |
| 54 | - Store secrets in ConfigMaps or as plain environment variables |
| 55 | - Use default ServiceAccount for application pods |
| 56 | - Allow unrestricted network access (default allow-all) |
| 57 | - Run containers as root without justification |
| 58 | - Skip health checks (liveness/readiness probes) |
| 59 | - Use latest tag for production images |
| 60 | - Expose unnecessary ports or services |
| 61 | |
| 62 | ## Common YAML Patterns |
| 63 | |
| 64 | ### Deployment with resource limits, probes, and security context |
| 65 | |
| 66 | ```yaml |
| 67 | apiVersion: apps/v1 |
| 68 | kind: Deployment |
| 69 | metadata: |
| 70 | name: my-app |
| 71 | namespace: my-namespace |
| 72 | labels: |
| 73 | app: my-app |
| 74 | version: "1.2.3" |
| 75 | spec: |
| 76 | replicas: 3 |
| 77 | selector: |
| 78 | matchLabels: |
| 79 | app: my-app |
| 80 | template: |
| 81 | metadata: |
| 82 | labels: |
| 83 | app: my-app |
| 84 | version: "1.2.3" |
| 85 | spec: |
| 86 | serviceAccountName: my-app-sa # never use default SA |
| 87 | securityContext: |
| 88 | runAsNonRoot: true |
| 89 | runAsUser: 1000 |
| 90 | fsGroup: 2000 |
| 91 | containers: |
| 92 | - name: my-app |
| 93 | image: my-registry/my-app:1.2.3 # never use latest |
| 94 | ports: |
| 95 | - containerPort: 8080 |
| 96 | resources: |
| 97 | requests: |
| 98 | cpu: "100m" |
| 99 | memory: "128Mi" |
| 100 | limits: |