xanderdunn / kube-state-rs

A stateless Kubernetes service in Rust to preserve node state between removing and adding nodes in a cluster
0 stars 0 forks source link

Add Kubernetes Pod Autoscaling #8

Closed xanderdunn closed 11 months ago

xanderdunn commented 11 months ago

Something like this:

apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
  name: my-app-hpa
  namespace: default
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: my-app
  minReplicas: 1
  maxReplicas: 10
  metrics:
  - type: Resource
    resource:
      name: cpu
      target:
        type: Utilization
        averageUtilization: 50
xanderdunn commented 11 months ago

This will not be a great autoscaling strategy because we will often be bottlenecked on network requests rather than on CPU. Ultimately we would want to scale up if the number of transactions to process is large.