apiVersion: autoscaling/v2beta2 
kind: HorizontalPodAutoscaler
metadata:
  name: cpu-autoscale 
  namespace: default
spec:
  scaleTargetRef:
    apiVersion: v1 
    kind: ReplicationController 
    name: fastapi-project-template-hpa 
  minReplicas: 1 
  maxReplicas: 5 
  metrics: 
  - type: Resource
    resource:
      name: cpu 
      target:
        type: Utilization 
        averageValue: 500m 
