resource-tuning

Solid

Right-size pod resources, configure HPA/VPA/KEDA, and eliminate resource waste in Kubernetes.

AI & Automation 14 stars 3 forks Updated 3 days ago MIT

Install

View on GitHub

Quality Score: 86/100

Stars 20%
39
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Skill: Resource Tuning > **Expertise:** CPU/memory right-sizing, HPA, VPA, KEDA event-driven scaling, namespace quota design. ## When to load When pods are OOMKilled, CPU-throttled, underutilised, or autoscaling isn't working as expected. ## Right-Sizing Methodology ``` 1. Observe → 7-day peak metrics (kubectl top / Prometheus) 2. Set request = average × 1.1 (room for normal variance) 3. Set limit = p99 peak × 1.3 (room for spike without OOM) 4. Verify no throttling with: throttled_cpu_seconds metric 5. Adjust after 2 weeks of production data ``` ```bash # Current resource usage (snapshot) kubectl top pods -n <ns> --sort-by=memory kubectl top pods -n <ns> --sort-by=cpu # Historical usage via Prometheus (7-day p99) # CPU p99: rate(container_cpu_usage_seconds_total{namespace="<ns>",pod=~"my-app-.*"}[5m]) > quantile_over_time(0.99, rate(...[5m])[7d:5m]) # Memory p99: quantile_over_time(0.99, container_memory_working_set_bytes{namespace="<ns>",pod=~"my-app-.*"}[7d:5m]) ``` ## HPA Configuration ```yaml # CPU + Memory HPA (Kubernetes 1.23+) apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: my-service namespace: production spec: scaleTargetRef: apiVersion: apps/v1 kind: Deployment name: my-service minReplicas: 2 maxReplicas: 20 metrics: - type: Resource resource: name: cpu target: type: Utilization averageUtilization: 70 # scale out at 70% avg CPU - type: Resource ...

Details

Author
sawrus
Repository
sawrus/agent-guides
Created
3 months ago
Last Updated
3 days ago
Language
Shell
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

DevOps & Infrastructure Solid

capacity-planning

Forecast infrastructure capacity needs — traffic projection, resource headroom calculations, node pool sizing, K8s cluster capacity.

14 Updated 3 days ago
sawrus
AI & Automation Featured

castai-core-workflow-b

Configure CAST AI Workload Autoscaler for pod-level right-sizing and VPA. Use when enabling workload autoscaling, configuring resource recommendations, or tuning pod CPU and memory requests with CAST AI. Trigger with phrases like "cast ai workload autoscaler", "cast ai pod sizing", "cast ai resource recommendations", "cast ai VPA".

2,266 Updated today
jeremylongshore
AI & Automation Listed

kubernetes-patterns

Provides Kubernetes resource management, Helm chart patterns, service mesh configuration, and autoscaling strategies. Covers HPA, VPA, KEDA, operators, security contexts, and namespace isolation. Use when user mentions 'kubernetes', 'k8s', 'helm', 'istio', 'linkerd', 'service mesh', 'HPA', 'VPA', 'KEDA', 'pod security', 'resource quotas', 'operators'.

62 Updated today
Tibsfox
AI & Automation Listed

keda

Configure, operate, and master KEDA (Kubernetes Event-driven Autoscaling) — ScaledObject, ScaledJob, TriggerAuthentication CRDs, 70+ scalers, HPA behavior tuning, scale-to-zero, the KEDA HTTP Add-on, production hardening, multi-trigger semantics, scalingModifiers formulas, GitOps integration, and troubleshooting stuck scalers. Covers the common traps (cooldownPeriod only applies to N→0, CPU/memory cannot drive scale-to-zero alone, activationThreshold vs threshold, multi-trigger max-of semantics, HPA conflicts).

3 Updated today
air-gapped
AI & Automation Featured

castai-performance-tuning

Optimize CAST AI autoscaler performance, node provisioning speed, and API efficiency. Use when nodes take too long to provision, autoscaler is not reacting fast enough, or optimizing API call patterns for multi-cluster dashboards. Trigger with phrases like "cast ai performance", "cast ai slow", "cast ai node provisioning", "cast ai autoscaler speed".

2,266 Updated today
jeremylongshore