rohitg00/kubectl-mcp-server/k8s-autoscaling

Claude Code and agent skill by rohitg00/kubectl-mcp-server

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Configure Kubernetes autoscaling with HPA, VPA, and KEDA. Use for horizontal/vertical pod autoscaling, event-driven scaling, and capacity management.

Install

npx vskill@latest install rohitg00/kubectl-mcp-server/k8s-autoscaling

SKILL.md

Kubernetes Autoscaling

Comprehensive autoscaling using HPA, VPA, and KEDA with kubectl-mcp-server tools.

Requires the cost, keda toolsets: start kubectl-mcp-server with --toolsets default,cost,keda (or MCP_TOOLSETS=default,cost,keda).

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

PriorityRuleImpactTools
1Verify metrics-server for HPACRITICALkubectl_top
2Set resource requests before HPACRITICALkubectl_describe
3Use KEDA for scale-to-zeroHIGHkeda_scaledobjects_list
4Check VPA recommendationsMEDIUMget_resource_recommendations

Quick Reference

TaskToolExample
List KEDA ScaledObjectskeda_scaledobjects_listkeda_scaledobjects_list(namespace)
Get ScaledObjectkeda_scaledobject_getkeda_scaledobject_get(name, namespace)
List ScaledJobskeda_scaledjobs_listkeda_scaledjobs_list(namespace)
Check KEDAdetect_ecosystemdetect_ecosystem()

HPA (Horizontal Pod Autoscaler)

Basic CPU-based scaling:

yaml
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: my-app-hpa
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: my-app
minReplicas: 2
maxReplicas: 10
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 70

Apply and verify:

python
kubectl_apply(hpa_yaml, namespace)
kubectl_get(resource_type="hpa", namespace)

VPA (Vertical Pod Autoscaler)

Right-size resource requests:

yaml
apiVersion: autoscaling.k8s.io/v1
kind: VerticalPodAutoscaler
metadata:
name: my-app-vpa
spec:
targetRef:
apiVersion: apps/v1
kind: Deployment
name: my-app
updatePolicy:
updateMode: "Auto"

KEDA (Event-Driven Autoscaling)

Detect KEDA Installation
python
detect_ecosystem()
List ScaledObjects
python
keda_scaledobjects_list(namespace)
keda_scaledobject_get(name, namespace)
List ScaledJobs
python
keda_scaledjobs_list(namespace)
Trigger Authentication
python
keda_triggerauths_list(namespace)
keda_triggerauth_get(name, namespace)
KEDA-Managed HPAs
python
keda_hpa_list(namespace)

See KEDA-TRIGGERS.md for trigger configurations.

Common KEDA Triggers

Queue-Based Scaling (AWS SQS)
yaml
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
name: sqs-scaler
spec:
scaleTargetRef:
name: queue-processor
minReplicaCount: 0
maxReplicaCount: 100
triggers:
- type: aws-sqs-queue
metadata:
queueURL: https://sqs.region.amazonaws.com/...
queueLength: "5"
Cron-Based Scaling
yaml
triggers:
- type: cron
metadata:
timezone: America/New_York
start: 0 8 * * 1-5
end: 0 18 * * 1-5
desiredReplicas: "10"
Prometheus Metrics
yaml
triggers:
- type: prometheus
metadata:
serverAddress: http://prometheus:9090
metricName: http_requests_total
query: sum(rate(http_requests_total{app="myapp"}[2m]))
threshold: "100"

Scaling Strategies

StrategyToolUse Case
CPU/MemoryHPASteady traffic patterns
Custom metricsHPA v2Business metrics
Event-drivenKEDAQueue processing, cron
VerticalVPARight-size requests
Scale to zeroKEDACost savings, idle workloads

Cost-Optimized Autoscaling

Scale to Zero with KEDA

Reduce costs for idle workloads:

python
keda_scaledobjects_list(namespace)
Right-Size with VPA

Get recommendations and apply:

python
get_resource_recommendations(namespace)

Troubleshooting

HPA Not Scaling
python
kubectl_get(resource_type="hpa", namespace)
kubectl_top(name, namespace)
kubectl_describe(name, namespace)
KEDA Not Triggering
python
keda_scaledobject_get(name, namespace)
kubectl_get(resource_type="events", namespace)
Common Issues
SymptomCheckResolution
HPA unknownMetrics serverInstall metrics-server
KEDA no scaleTrigger authCheck TriggerAuthentication
VPA not updatingUpdate modeSet updateMode: Auto
Scale down slowStabilizationAdjust stabilizationWindowSeconds

Best Practices

  1. Always Set Resource Requests - HPA requires requests to calculate utilization
  2. Use Multiple Metrics - Combine CPU + custom metrics for accuracy
  3. Stabilization Windows - Prevent flapping with scaleDown stabilization
  4. Scale to Zero Carefully - Consider cold start time

Related Skills

Security

  • Security scanPassed, 96 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
853
Repository forks
166
Repository npm downloads, 7 days
360
7-day trend score
48

Stars and forks are for the whole GitHub repository, not this skill alone. Downloads are for the repository's npm package. Refreshed 20 Mar 2026, 8 months ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/rohitg00/kubectl-mcp-server/k8s-autoscaling/badge)](https://verified-skill.com/skills/rohitg00/kubectl-mcp-server/k8s-autoscaling)

Something wrong with this skill or its page? Tell us.