apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
  name: websiteinfo
  namespace: website
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: websiteinfo
  minReplicas: 2
  maxReplicas: 10
  metrics:
  - type: Resource
    resource:
      name: cpu
      # scale up if usage is above
      targetAverageUtilization: 80
  - type: Resource
    resource:
      name: memory
      # scale up if usage is above
      targetAverageValue: 12Gi
