apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
  name: nodeapp
spec:
  minReplicas: 1
  maxReplicas: 20
  metrics:
  - resource:
      name: cpu
      target:
        averageUtilization: 70
        type: Utilization
    type: Resource
  scaleTargetRef:
    apiVersion: extensions/v1beta1
    kind: Deployment
    name: nodeapp