apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
  name: cuda-test
  namespace: default
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: cuda-test
  minReplicas: 1
  maxReplicas: 3
  metrics:
  - type: Object
    object:
      target:
        apiVersion: "apps/v1"
        kind: deployment
        name: cuda-test
      metricName: "cuda_test_gpu_avg"
      targetValue: 5