HorizontalPodAutoscaler:apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: api-hpa namespace: default spec: scaleTargetRef: apiVersion: apps/v1 kind: Deployment name: api minReplicas: 2 maxReplicas: 30 metrics: - type: External external: metric: name: http_requests_per_second selector: matchLabels: service: api target: type: AverageValue averageValue: 100

发表评论 取消回复