devops-kubernetes-autoscaling
Use when the user asks about HPA, VPA, Cluster Autoscaler, Karpenter, KEDA to scale pods on queue length, custom or external metrics autoscaling, scaling…
от j4flmao★ 47 звёзд на GitHub
Установить devops-kubernetes-autoscaling в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Kubernetes Autoscaling
Purpose
Design, implement, and optimize Kubernetes autoscaling strategies using HPA, VPA, Keda, and Cluster Autoscaler to achieve cost-efficient, responsive, and reliable workloads.
Agent Protocol
Trigger
Exact user phrases: "HPA", "VPA", "Keda", "Cluster Autoscaler", "autoscaling", "horizontal pod autoscaler", "vertical pod autoscaler", "Keda scaler", "pod scaling", "node scaling", "predictive scaling", "autoscaling strategy".
Input Context
Before activating, verify:
- Kubernetes version and available autoscaling APIs.
- Workload characteristics (stateless, stateful, batch, event-driven).
- Metric sources (Prometheus, custom metrics API, external metrics API).
- Node group configuration (instance types, min/max sizes, spot vs. on-demand).
- Cluster autoscaler version and configuration.
Output Artifact
Writes to YAML manifests for HPA, VPA, ScaledObject, ScaledJob, and ClusterAutoscaler configuration.
Response Format
YAML manifests with appropriate apiVersion and autoscaling parameters.
Completion Criteria
This skill is complete when:
- HPA configured with appropriate metrics and behavior.
- VPA configured with correct update mode and resource recommendations.
- Keda ScaledObject created for event-driven workloads.
- Cluster Autoscaler configured for efficient node scaling.
- Combined strategy documented with mutual exclusion rules.
Max Response Length
Direct file write. No response text.
Quick Start
Deploy metrics-server → Create HPA with CPU target → Add custom metric → Configure VPA in "off" mode for initial recommendations → Deploy Keda for event-driven scale → Configure Cluster Autoscaler node groups → Monitor with K9s or Prometheus.
Decision Tree: Which Scaling Mechanism?
- Stateless web service, request-based → HPA with CPU/memory or request metrics per second
- Batch job, queue depth, event-driven → Keda ScaledJob or ScaledObject with queue scaler
- Streaming/Kafka consumer → Keda with Kafka scaler (lag-based)
- Stateful workload, right-sizing resources → VPA in Auto mode (if restart-tolerant) or Off/Initial (recommend only)
- Workloads needing both replica count + resource optimization → HPA (replicas) + VPA Off (recommendations)
- Node capacity insufficient for pending pods → Cluster Autoscaler or Karpenter
- Predictive/ML-based scaling → Keda with Predictive Scaler or custom external metrics
Core Workflow
Step 1: Deploy Metrics Server
kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml
Step 2: HPA Configuration with Behavior
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: app-hpa
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: app
minReplicas: 2
maxReplicas: 10
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 70
- type: Resource
resource:
name: memory
target:
type: Utilization
averageUtilization: 80
behavior:
scaleDown:
stabilizationWindowSeconds: 300
policies:
- type: Percent
value: 10
periodSeconds: 60
scaleUp:
stabilizationWindowSeconds: 0
policies:
- type: Percent
value: 100
periodSeconds: 60
- type: Pods
value: 4
periodSeconds: 60
selectPolicy: Max
Step 3: Custom and External Metrics HPA
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: app-custom-metrics
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: app
minReplicas: 2
maxReplicas: 20
metrics:
- type: Pods
pods:
metric:
name: http_requests_per_second
target:
type: AverageValue
averageValue: 100
- type: Object
object:
metric:
name: requests_total
describedObject:
apiVersion: v1
kind: Service
name: app-service
target:
type: Value
value: 10000
- type: External
external:
metric:
name: sqs_approximate_message_count
selector:
matchLabels:
queue: my-queue
target:
type: AverageValue
averageValue: 5
Step 4: VPA Update Modes Comparison
| Mode | Behavior | Use Case |
|---|---|---|
Off |
Only recommends, never applies | Observe recommendations before committing |
Initial |
Sets resources only at pod creation | StatefulSets, legacy apps |
Auto |
Updates on recreate (evicts pod) | Stateless deployments with restart tolerance |
Recreate |
Updates on recreate, similar to Auto | When pod restart triggers reallocation |
apiVersion: autoscaling.k8s.io/v1
kind: VerticalPodAutoscaler
metadata:
name: app-vpa
spec:
targetRef:
apiVersion: "apps/v1"
kind: Deployment
name: app
updateP
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- references/autoscaling-strategies.md
- references/cluster-autoscaler.md
- references/hpa-patterns.md
- references/keda-scalers.md
- references/kubernetes-autoscaling-advanced.md
- references/kubernetes-autoscaling-fundamentals.md
- references/vpa-config.md
FAQ
Что делает скилл devops-kubernetes-autoscaling?
Use when the user asks about HPA, VPA, Cluster Autoscaler, Karpenter, KEDA to scale pods on queue length, custom or external metrics autoscaling, scaling behavior and flapping, or autoscaling cost. Produces combined HPA/VPA/node autoscaling configs. Not for KEDA scaler details (use cloud-native-event-driven-scaling) or data workloads (use devops-kubernetes-for-data).
Как установить скилл devops-kubernetes-autoscaling?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл devops-kubernetes-autoscaling запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
AnthropicCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
discernment-nudge
AnthropicAfter you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
data-consolidate
AnthropicJoins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
inspection-to-capa
AnthropicRuns the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…