apiVersion: apps/v1 kind: Deployment metadata: name: petclinic-controlled-scaling-6 spec: replicas: 1 selector: matchLabels: app: petclinic-controlled-scaling-6 template: metadata: labels: app: petclinic-controlled-scaling-6 spec: containers: - name: petclinic-controlled-scaling-6 image: springcommunity/spring-framework-petclinic ports: - containerPort: 8080 resources: requests: cpu: "10m" memory: "800Mi" readinessProbe: failureThreshold: 3 httpGet: path: / port: 8080 scheme: HTTP periodSeconds: 10 initialDelaySeconds: 180 livenessProbe: httpGet: path: / port: 8080 initialDelaySeconds: 5 periodSeconds: 5 --- apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: petclinic-hpa-controlled-scaling-6 spec: scaleTargetRef: apiVersion: apps/v1 kind: Deployment name: petclinic-controlled-scaling-6 minReplicas: 1 maxReplicas: 10 metrics: - type: Resource resource: name: cpu target: type: Utilization averageUtilization: 80 # behavior: # These are the default values for reference # scaleDown: # stabilizationWindowSeconds: 300 # scaleUp: # stabilizationWindowSeconds: 0