apiVersion: apps/v1 kind: Deployment metadata: name: petclinic-thrashing-6 spec: replicas: 1 selector: matchLabels: app: petclinic-thrashing-6 template: metadata: labels: app: petclinic-thrashing-6 spec: containers: - name: petclinic-thrashing-6 image: springcommunity/spring-framework-petclinic ports: - containerPort: 8080 resources: requests: cpu: "10m" memory: "800Mi" livenessProbe: httpGet: path: / port: 8080 initialDelaySeconds: 5 periodSeconds: 5 --- apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: petclinic-hpa-thrashing-6 spec: scaleTargetRef: apiVersion: apps/v1 kind: Deployment name: petclinic-thrashing-6 minReplicas: 1 maxReplicas: 10 metrics: - type: Resource resource: name: cpu target: type: Utilization averageUtilization: 80