# seems to work only on the cluster with enable-kubernetes-alpha selected
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
  name: predict-deployment
  namespace: default
spec:
  maxReplicas: 10
  minReplicas: 2
  scaleTargetRef:
    apiVersion: extensions/v1beta1
    kind: Deployment
    name: predict-deployment
  targetCPUUtilizationPercentage: 80 # v1 stuff
  # metrics:
  # - type: Resource
  #   resource:
  #     name: cpu
  #     targetAverageUtilization: 30
  # - type: Pods
  #   pods:
  #     metricName: packets-per-second
  #     targetAverageValue: 1k
