A Kubernetes operator for managing automatic node group scaling based on various triggers and cloud providers.
The Node Group Scaler Operator is a Kubernetes operator that automates the scaling of node groups across different cloud providers. It provides a flexible and powerful way to manage your cluster’s infrastructure based on various triggers and conditions.
# Add the Helm repository
helm repo add node-group-scaler https://charts.nodegroupscaler.io
helm repo update
# Install the operator
helm install node-group-scaler node-group-scaler/node-group-scaler \
--namespace node-group-scaler \
--create-namespace
kubectl apply -f https://raw.githubusercontent.com/joao208/node-group-scaler/main/deploy/manifests.yaml
apiVersion: scaling.nodegroupscaler.io/v1alpha1
kind: NodeGroupScalingPolicy
metadata:
name: example-policy
namespace: default
spec:
nodeGroup:
name: my-node-group
provider: aws
region: us-west-2
scaling:
minNodes: 2
maxNodes: 10
schedule:
- cron: "0 9 * * 1-5" # Scale up at 9 AM on weekdays
targetNodes: 8
- cron: "0 18 * * 1-5" # Scale down at 6 PM on weekdays
targetNodes: 2
cooldownPeriod: 300 # 5 minutes between scaling operations
apiVersion: scaling.nodegroupscaler.io/v1alpha1
kind: NodeGroupScalingPolicy
metadata:
name: basic-scaling
spec:
nodeGroup:
name: production-nodes
provider: aws
scaling:
minNodes: 3
maxNodes: 15
schedule:
- cron: "0 8 * * *"
targetNodes: 10
apiVersion: scaling.nodegroupscaler.io/v1alpha1
kind: NodeGroupScalingPolicy
metadata:
name: complex-scaling
spec:
nodeGroup:
name: production-nodes
provider: aws
scaling:
minNodes: 3
maxNodes: 20
schedule:
- cron: "0 8 * * 1-5"
targetNodes: 15
description: "Weekday morning scale up"
- cron: "0 18 * * 1-5"
targetNodes: 5
description: "Weekday evening scale down"
- cron: "0 10 * * 0,6"
targetNodes: 8
description: "Weekend morning scale up"
The operator provides detailed metrics and logs for all scaling operations:
Common issues and their solutions:
Scaling not occurring
Permission issues
Scaling limits reached
We welcome contributions! Please see our Contributing Guide for details on how to submit pull requests, report issues, and contribute to the project.
make setup