apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
  name: k8s-hpa-app
  namespace: default
spec:
  scaleTargetRef:
    apiVersion: apps/v1beta1
    kind: Deployment
    name: k8s-hpa-app-deployment
  minReplicas: 1
  maxReplicas: 5
  metrics:
  - type: Resource
    resource:
      name: cpu
      target: 
        type: Utilization
        averageUtilization: 70