apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
  name: test-autoscaler 
spec:
  scaleTargetRef:
    kind: DeploymentConfig 
    name: frontend 
    apiVersion: v1
  minReplicas: 1 
  maxReplicas: 10
  metrics:
    # a memory resource stops the default of 80% for cpu to apply
    - type: Resource
      resource:
        name: memory
        targetAverageUtilization: 42