Skill v1.1.1
currentAutomated scan100/100name: 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 company: https://synergetic.solutions 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
- 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/v1kind: Deploymentmetadata:name: my-appnamespace: my-namespacelabels:app: my-appversion: "1.2.3"spec:replicas: 3selector:matchLabels:app: my-apptemplate:metadata:labels:app: my-appversion: "1.2.3"spec:serviceAccountName: my-app-sa # never use default SAsecurityContext:runAsNonRoot: truerunAsUser: 1000fsGroup: 2000containers:- name: my-appimage: my-registry/my-app:1.2.3 # never use latestports:- containerPort: 8080resources:requests:cpu: "100m"memory: "128Mi"limits:cpu: "500m"memory: "512Mi"livenessProbe:httpGet:path: /healthzport: 8080initialDelaySeconds: 15periodSeconds: 20readinessProbe:httpGet:path: /readyport: 8080initialDelaySeconds: 5periodSeconds: 10securityContext:allowPrivilegeEscalation: falsereadOnlyRootFilesystem: truecapabilities:drop: ["ALL"]envFrom:- secretRef:name: my-app-secret # pull credentials from Secret, not ConfigMap
Minimal RBAC (least privilege)
apiVersion: v1kind: ServiceAccountmetadata:name: my-app-sanamespace: my-namespace---apiVersion: rbac.authorization.k8s.io/v1kind: Rolemetadata:name: my-app-rolenamespace: my-namespacerules:- apiGroups: [""]resources: ["configmaps"]verbs: ["get", "list"] # grant only what is needed---apiVersion: rbac.authorization.k8s.io/v1kind: RoleBindingmetadata:name: my-app-rolebindingnamespace: my-namespacesubjects:- kind: ServiceAccountname: my-app-sanamespace: my-namespaceroleRef:kind: Rolename: my-app-roleapiGroup: rbac.authorization.k8s.io
NetworkPolicy (default-deny + explicit allow)
# Deny all ingress and egress by defaultapiVersion: networking.k8s.io/v1kind: NetworkPolicymetadata:name: default-deny-allnamespace: my-namespacespec:podSelector: {}policyTypes: ["Ingress", "Egress"]---# Allow only specific trafficapiVersion: networking.k8s.io/v1kind: NetworkPolicymetadata:name: allow-my-appnamespace: my-namespacespec:podSelector:matchLabels:app: my-apppolicyTypes: ["Ingress"]ingress:- from:- podSelector:matchLabels:app: frontendports:- protocol: TCPport: 8080
Validation Commands
After deploying, verify health and security posture:
# Watch rollout completekubectl rollout status deployment/my-app -n my-namespace# Stream pod events to catch crash loops or image pull errorskubectl get pods -n my-namespace -w# Inspect a specific pod for failureskubectl describe pod <pod-name> -n my-namespace# Check container logskubectl logs <pod-name> -n my-namespace --previous # use --previous for crashed containers# Verify resource usage vs. limitskubectl top pods -n my-namespace# Audit RBAC permissions for a service accountkubectl auth can-i --list --as=system:serviceaccount:my-namespace:my-app-sa# Roll back a failed deploymentkubectl rollout undo deployment/my-app -n my-namespace
Output Templates
When implementing Kubernetes resources, provide:
- Complete YAML manifests with proper structure
- RBAC configuration if needed (ServiceAccount, Role, RoleBinding)
- NetworkPolicy for network isolation
- Brief explanation of design decisions and security considerations
Maintained by @jeffallan, Principal Consultant at Synergetic Solutions