apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
  name: my-python-app-mem
  namespace: default
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: my-python-app-mem
  maxReplicas: 10
  minReplicas: 1
  metrics: 
  - type: Resource
    resource:
      name: memory 
      target:
        type: Utilization
        averageUtilization: 70 