k8s-autoscaling
Set up automatic scaling for Kubernetes workloads using HPA for CPU/memory-based scaling, VPA for resource optimization, and KEDA for event-driven scenarios like queue processing and scheduled scaling. Includes tools for detecting installations, managing scaled objects, and troubleshooting common scaling issues.
k8s-autoscaling configures horizontal and vertical pod autoscaling with HPA, VPA, and KEDA for Kubernetes workloads.
AI-generated summary based on this skill's SKILL.md
Install
rohitg00/kubectl-mcp-server/k8s-autoscaling · repository language: Python
git clone https://github.com/rohitg00/kubectl-mcp-server
cp -r kubectl-mcp-server/kubernetes-skills/claude/k8s-autoscaling ~/.claude/skills/k8s-autoscalingnpx skillfed install rohitg00/kubectl-mcp-server/k8s-autoscalingFrequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
How to set up kubernetes horizontal pod autoscaling?
k8s-autoscaling enables HPA configuration for automatic pod scaling based on CPU and memory metrics. Deploy the metrics server, define HPA resources with target thresholds, and k8s-autoscaling provides templates and troubleshooting guidance. HPA continuously monitors metrics and adjusts replica counts within min/max bounds to maintain performance during traffic spikes.
What's the difference between HPA, VPA, and KEDA in k8s-autoscaling?
k8s-autoscaling covers three complementary scaling approaches: HPA scales pod replicas based on CPU/memory metrics; VPA right-sizes resource requests by analyzing actual usage patterns; KEDA enables event-driven scaling from queues, cron schedules, and custom triggers. Use HPA for horizontal scaling, VPA for resource optimization, and KEDA for queue-based or scheduled workloads.
How can I configure event-driven scaling using KEDA for queue and cron triggers?
k8s-autoscaling provides KEDA ScaledObjects configuration for queue-based and cron-triggered scaling. Define triggers for SQS, RabbitMQ, or cron schedules, set authentication credentials, and specify target metrics. KEDA monitors external events and scales pods to zero when inactive, enabling cost optimization for batch jobs and event-driven workloads.
How does k8s-autoscaling help with scale-to-zero and cost optimization?
k8s-autoscaling implements scale-to-zero strategies through KEDA for event-driven workloads and VPA for right-sizing resources. Idle pods scale to zero, eliminating wasted compute costs. Combined with HPA stabilization windows and proper resource requests, k8s-autoscaling reduces infrastructure spend while maintaining performance during active periods.
What should I do if HPA is not scaling my pods?
k8s-autoscaling provides troubleshooting guidance for scaling issues: verify metrics server installation, check HPA status and events, confirm resource requests are set, validate metric thresholds, and review stabilization windows. Common causes include missing metrics, incorrect target values, or insufficient resource definitions. k8s-autoscaling includes diagnostic tools to identify and resolve these problems.
How does k8s-autoscaling use Prometheus metrics for custom HPA scaling?
k8s-autoscaling supports custom metrics HPA v2 with Prometheus integration for scaling beyond CPU/memory. Configure custom metric queries, set up metric adapters, and define HPA rules targeting Prometheus metrics. This enables scaling based on application-specific metrics like request latency, queue depth, or business KPIs collected by Prometheus.
SKILL.md
rendered from the published skill — quoted content, verbatim
Kubernetes Autoscaling
Comprehensive autoscaling using HPA, VPA, and KEDA with kubectl-mcp-server tools.
When to Apply
Use this skill when: - User mentions: "HPA", "VPA", "KEDA", "autoscale", "scale to zero" - Operations: configuring autoscaling, checking scaling status - Keywords: "scale automatically", "event-driven", "right-size"
Priority Rules
| Priority | Rule | Impact | Tools |
|---|---|---|---|
| 1 | Verify metrics-server for HPA | CRITICAL | get_resource_metrics |
| 2 | Set resource requests before HPA | CRITICAL | describe_pod |
| 3 | Use KEDA for scale-to-zero | HIGH | keda_scaledobjects_list_tool |
| 4 | Check VPA recommendations | MEDIUM | get_resource_recommendations |
Quick Reference
| Task | Tool | Example |
|---|---|---|
| List KEDA ScaledObjects | keda_scaledobjects_list_tool |
keda_scaledobjects_list_tool(namespace) |
(truncated - see the full file via the links below)
Read as markdown · JSON record · Browse the source repository
File tree — 4 files
kubernetes-skills/claude/k8s-autoscaling/KEDA-TRIGGERS.md
kubernetes-skills/claude/k8s-autoscaling/SKILL.md
kubernetes-skills/claude/k8s-autoscaling/examples/hpa-cpu.yaml
kubernetes-skills/claude/k8s-autoscaling/examples/keda-scaledobject.yaml