apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
  name: gke-test-hpa
  namespace: default
  labels:
    app: gke-test-deployment
spec:
  scaleTargetRef:
    kind: Deployment
    name: gke-test-deployment
    apiVersion: apps/v1beta1
  minReplicas: 2
  maxReplicas: 8 #traffic 4 times more than typical, add schedule scaling if wanted
  metrics:
    - type: Resource
      resource:
        name: cpu
        targetAverageUtilization: 80

# ScheduledScaler if required to scale within specific hours