Autoscaling Configuration

by aj-geddes3f5182cfd739No license355 starsListed Oct 8, 2026Updated Oct 8, 2026Repository updated 7 months ago

Configure autoscaling for Kubernetes, VMs, and serverless workloads based on metrics, schedules, and custom indicators.

Includes scriptsDevOps & Cloud
AI-generated overview

Guides configuring autoscaling for Kubernetes, VMs, and serverless workloads using metrics, schedules, and custom indicators.

What it does
Provides reference guidance and starter configuration for autoscaling, covering Kubernetes Horizontal Pod Autoscaler, AWS Auto Scaling, custom metrics, monitoring, and autoscaling scripts. It includes a YAML starter template and a validation script for checking configurations. It also lists best practices such as setting min/max replicas, cooldown periods, and using multiple metrics.
When to use it
Use when setting up or reviewing autoscaling for traffic-driven, scheduled, or resource-utilization-based scaling. It suits cost reduction, peak-load handling, batch processing, and database connection pooling scenarios.
Requirements
Ships an executable validation script (scripts/validate-config.sh) and a YAML starter template. Applying the configurations requires the relevant platforms, such as a Kubernetes cluster or AWS account, but no credentials are specified in the skill.

Autoscaling Configuration

Table of Contents

Overview

Implement autoscaling strategies to automatically adjust resource capacity based on demand, ensuring cost efficiency while maintaining performance and availability.

When to Use

  • Traffic-driven workload scaling
  • Time-based scheduled scaling
  • Resource utilization optimization
  • Cost reduction
  • High-traffic event handling
  • Batch processing optimization
  • Database connection pooling

Quick Start

Minimal working example:

yaml
# hpa-configuration.yamlapiVersion: autoscaling/v2kind: HorizontalPodAutoscalermetadata:  name: myapp-hpa  namespace: productionspec:  scaleTargetRef:    apiVersion: apps/v1    kind: Deployment    name: myapp  minReplicas: 2  maxReplicas: 20  metrics:    - type: Resource      resource:        name: cpu        target:          type: Utilization          averageUtilization: 70    - type: Resource      resource:        name: memory        target:          type: Utilization// ... (see reference guides for full implementation)

Reference Guides

Detailed implementations in the references/ directory:

GuideContents
Kubernetes Horizontal Pod Autoscaler [blocked]Kubernetes Horizontal Pod Autoscaler
AWS Auto Scaling [blocked]AWS Auto Scaling
Custom Metrics Autoscaling [blocked]Custom Metrics Autoscaling
Autoscaling Script [blocked]Autoscaling Script
Monitoring Autoscaling [blocked]Monitoring Autoscaling

Best Practices

✅ DO

  • Set appropriate min/max replicas
  • Monitor metric aggregation window
  • Implement cooldown periods
  • Use multiple metrics
  • Test scaling behavior
  • Monitor scaling events
  • Plan for peak loads
  • Implement fallback strategies

❌ DON'T

  • Set min replicas to 1
  • Scale too aggressively
  • Ignore cooldown periods
  • Use single metric only
  • Forget to test scaling
  • Scale below resource needs
  • Neglect monitoring
  • Deploy without capacity tests

Source and attribution

Source:aj-geddes/useful-ai-promptsinskills/autoscaling-configurationat commit3f5182c

License: No license

Content belongs to its original authors. SourceWeft indexes it from a public repository.

Report or request removal