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