><p>要进行自动扩容，可以新建一个 HPA 对象：</p><pre><code class=language-yaml data-expandlinks=true data-repo=istio>apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
  name: my-ingressgateway
  namespace: istio-system
spec:
  maxReplicas: 5
  minReplicas: 1
  scaleTargetRef:
    apiVersion: apps/v1beta1
    kind: Deployment
    name: my-ingressgateway
  targetCPUUtilizationPercentage: 80
status:
  currentCPUUtilizationPercentage: 0
  currentReplicas: 1
  desiredReplicas: 1<