hpa-horizontal-pod-autoscaler
sample
v1
v2
k autoscale sts thanos-receive-cluster3-tmp -n thanos --cpu-percent=60 --min=1 --max=10 --dry-run=client -oyaml > ~/environment/hpa.yaml
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
creationTimestamp: null
name: thanos-receive-cluster3-tmp
spec:
maxReplicas: 10
minReplicas: 1
scaleTargetRef:
apiVersion: apps/v1
kind: StatefulSet
name: thanos-receive-cluster3-tmp
metrics:
- type: Resource
resource:
name: memory
target:
type: Utilization
averageUtilization: 70
resource