2.10.3.4. Istio Pilot 配置

您可以将 Pilot 配置为在资源分配上调度或设置限制。以下示例描述了 ServiceMeshControlPlane 的 Pilot 参数,以及可用参数和值的信息。

pilot 参数示例

spec:
  runtime:
    components:
      pilot:
        deployment:
          autoScaling:
            enabled: true
            minReplicas: 1
            maxReplicas: 5
            targetCPUUtilizationPercentage: 85
        pod:
          tolerations:
          - key: node.kubernetes.io/unreachable
            operator: Exists
            effect: NoExecute
            tolerationSeconds: 60
          affinity:
            podAntiAffinity:
              requiredDuringScheduling:
              - key: istio
                topologyKey: kubernetes.io/hostname
                operator: In
                values:
                - pilot
        container:
          resources:
            limits:
              cpu: 100m
              memory: 128M

表 2.9. Istio Pilot 参数

参数描述默认值

cpu

Pilot 请求的 CPU 资源的百分比。

基于环境配置的 CPU 资源(以毫秒为单位)。

10m

memory

Pilot 请求的内存量。

可用内存,以字节为单位(例如: 200Ki, 50Mi, 5Gi),根据您的环境配置而定。

128Mi

autoscaleEnabled

启用/禁用自动扩展。在小型环境中禁用它。

true/false

true

traceSampling

这个值控制随机抽样的频率。注: 在开发或测试时可以增加这个值。

有效百分比。

1.0