From deb4e8ac550dc8c67bc7a40a77dcaf01b2dc6e50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jelena=20Vu=C4=8Di=C4=87?= Date: Fri, 1 May 2026 10:56:42 +0200 Subject: [PATCH] added hpa.yaml --- k8s/moj-servis/hpa.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 k8s/moj-servis/hpa.yaml diff --git a/k8s/moj-servis/hpa.yaml b/k8s/moj-servis/hpa.yaml new file mode 100644 index 0000000..4779527 --- /dev/null +++ b/k8s/moj-servis/hpa.yaml @@ -0,0 +1,21 @@ +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: moj-servis-hpa + namespace: student-vucicj +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: moj-servis + + minReplicas: 3 + maxReplicas: 10 + + metrics: + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: 60 \ No newline at end of file