From kubernetes-toolkit
Provides Kubernetes best practices for production manifests: resource management, image versioning, secrets/configmaps, security contexts, health probes, and workload selection. For YAML files, deployments, pods, services.
How this skill is triggered — by the user, by Claude, or both
Slash command
/kubernetes-toolkit:kubernetes-best-practicesThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill provides guidance for writing production-ready Kubernetes manifests and managing cloud-native applications.
This skill provides guidance for writing production-ready Kubernetes manifests and managing cloud-native applications.
Memory: Set requests and limits to the same value to ensure QoS class and prevent OOM kills.
CPU: Set requests only, omit limits to allow performance bursting and avoid throttling.
resources:
requests:
memory: "256Mi"
cpu: "250m"
limits:
memory: "256Mi"
# No CPU limit
Always pin specific versions, never use :latest tag unless explicitly requested:
# Good
image: nginx:1.25.3
# Bad
image: nginx:latest
For immutability, consider pinning to specific digests.
Secrets: Sensitive data (passwords, tokens, certificates) ConfigMaps: Non-sensitive configuration (feature flags, URLs, settings)
env:
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: app-secrets
key: database-url
- name: LOG_LEVEL
valueFrom:
configMapKeyRef:
name: app-config
key: log-level
Best practices:
Choose the appropriate workload type:
Always implement security best practices:
securityContext:
runAsNonRoot: true
runAsUser: 1000
fsGroup: 1000
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
Security checklist:
Implement all three probe types:
Liveness: Restart container if unhealthy Readiness: Remove from service endpoints if not ready Startup: Allow slow-starting containers time to initialize
livenessProbe:
httpGet:
path: /healthz
port: 8080
initialDelaySeconds: 30
periodSeconds: 10
readinessProbe:
httpGet:
path: /ready
port: 8080
initialDelaySeconds: 5
periodSeconds: 5
startupProbe:
httpGet:
path: /startup
port: 8080
periodSeconds: 10
failureThreshold: 30
Replica counts: Set minimum 2 for production workloads
Pod Disruption Budgets: Maintain availability during voluntary disruptions
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: app-pdb
spec:
minAvailable: 2
selector:
matchLabels:
app: web-app
Additional HA considerations:
Use namespaces for environment isolation and apply resource quotas:
apiVersion: v1
kind: ResourceQuota
metadata:
name: prod-quota
namespace: production
spec:
hard:
requests.cpu: "100"
requests.memory: 200Gi
persistentvolumeclaims: "10"
Benefits: Logical separation, resource limits, RBAC boundaries, cost tracking
Use consistent, recommended labels:
metadata:
labels:
app.kubernetes.io/name: myapp
app.kubernetes.io/instance: myapp-prod
app.kubernetes.io/version: "1.0.0"
app.kubernetes.io/component: backend
app.kubernetes.io/part-of: ecommerce
app.kubernetes.io/managed-by: helm
Choose appropriate storage class and access mode:
Access Modes:
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: app-data
spec:
accessModes:
- ReadWriteOnce
storageClassName: fast-ssd
resources:
requests:
storage: 10Gi
Always validate before applying to production:
kubectl apply --dry-run=client -f manifest.yamlkubectl apply --dry-run=server -f manifest.yamlWhen creating or reviewing Kubernetes manifests:
npx claudepluginhub p/armanzeroeight-kubernetes-toolkit-plugins-kubernetes-toolkitProvides YAML examples and best practices for Kubernetes manifests: Pods, Deployments, Services, ConfigMaps, Secrets, probes, resources, labels, and kubectl validation.
Creates and manages Kubernetes workloads, Helm charts, RBAC, NetworkPolicies, and GitOps pipelines. Debugs pod crashes, analyzes resource limits, and configures storage.
Provides quick Kubernetes reference for manifests (Pods, Deployments, Services), security hardening, RBAC, kubectl commands, and troubleshooting. Activates on Kubernetes YAML files.