From fc64ab7f7bf125a1ba29bef2868569e585aa569f Mon Sep 17 00:00:00 2001 From: KOSASIH Date: Mon, 29 Jul 2024 20:17:20 +0700 Subject: [PATCH] Create horizontal-pod-autoscaler.yaml --- .../kubernetes/horizontal-pod-autoscaler.yaml | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 blockchain_integration/pi_network/Infrastructure/kubernetes/horizontal-pod-autoscaler.yaml diff --git a/blockchain_integration/pi_network/Infrastructure/kubernetes/horizontal-pod-autoscaler.yaml b/blockchain_integration/pi_network/Infrastructure/kubernetes/horizontal-pod-autoscaler.yaml new file mode 100644 index 000000000..888ca2e08 --- /dev/null +++ b/blockchain_integration/pi_network/Infrastructure/kubernetes/horizontal-pod-autoscaler.yaml @@ -0,0 +1,21 @@ +apiVersion: autoscaling/v2beta2 +kind: HorizontalPodAutoscaler +metadata: + name: pi-network-hpa +spec: + selector: + matchLabels: + app: pi-network + minReplicas: 3 + maxReplicas: 10 + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: pi-network + metrics: + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: 50