日本熟妇hd丰满老熟妇,中文字幕一区二区三区在线不卡 ,亚洲成片在线观看,免费女同在线一区二区

增強ASM網關高可用性

ASM網關作為業務的流量入口,為了避免服務不可用,增強ASM網關的高可用性非常重要。本文介紹如何增強ASM網關的高可用性。

前提條件

在ACK集群中增強ASM網關高可用性

在ACK集群中,您可以在創建ASM網關時通過YAML配置Pod反親和性策略,實現ASM網關的Pod分布到不同的Node節點或者可用區,從而增強ASM網關的高可用性。

  • 在ASM網關中配置podAntiAffinity參數,使ASM網關的Pod分布到不同的Node節點。

    apiVersion: istio.alibabacloud.com/v1beta1
    kind: IstioGateway
    metadata:   
      name: ingressgateway-1
      namespace: istio-system
    spec:  
      clusterIds:
        - "c954ee9df88f64f229591f0ea4c61****"
      cpu: 
        targetAverageUtilization: 80
      externalTrafficPolicy: Local
      maxReplicas: 4
      minReplicas: 2  
      ports:  
      - name: status-port
        port: 15020    
        targetPort: 15020  
      - name: http2    
        port: 80    
        targetPort: 80  
      - name: https    
        port: 443    
        targetPort: 80
      - name: tls    
        port: 15443    
        targetPort: 15443  
      replicaCount: 1  
      resources:
        limits:
          cpu: '2'
          memory: 2G
        requests:
          cpu: 200m
          memory: 256Mi
      sds:
        enabled: true
        resources:
          requests:
            cpu: 100m
            memory: 128Mi
          limits:
            cpu: 2000m
            memory: 1024Mi
      serviceType: LoadBalancer  
      affinity:
            podAntiAffinity:
              preferredDuringSchedulingIgnoredDuringExecution:
              - podAffinityTerm:
                  labelSelector:
                    matchExpressions:
                    - key: app
                      operator: In
                      values:
                      - istio-ingressgateway-1
                  topologyKey: kubernetes.io/hostname
                weight: 100 
      rollingMaxSurge: "100%"
      rollingMaxUnavailable: "25%"
    • preferredDuringSchedulingIgnoredDuringExecution:表示Pod反親和性為軟親和性。在調度Pod到節點的時候,如果沒有滿足所設置要求,也可以繼續調度Pod。

    • matchExpressions:設置keyappoperatorInvaluesistio-ingressgateway-1,表示Pod不能和包含app=istio-ingressgateway-1標簽的Pod部署在一個節點上,即一個節點只能部署一個包含app=istio-ingressgateway-1標簽的Pod。

    • topologyKey:設置Pod反親和性生效的維度。

      本例設置kubernetes.io/hostname,表示在節點拓撲域中生效。

  • 在ASM網關中配置podAntiAffinity參數,使ASM網關的Pod分布到不同的可用區。

    apiVersion: istio.alibabacloud.com/v1beta1
    kind: IstioGateway
    metadata:   
      name: ingressgateway-1
      namespace: istio-system
    spec:  
      clusterIds:
        - "c954ee9df88f64f229591f0ea4c61****"
      cpu: 
        targetAverageUtilization: 80
      externalTrafficPolicy: Local
      maxReplicas: 4
      minReplicas: 2  
      ports:  
      - name: status-port
        port: 15020    
        targetPort: 15020  
      - name: http2    
        port: 80    
        targetPort: 80  
      - name: https    
        port: 443    
        targetPort: 80
      - name: tls    
        port: 15443    
        targetPort: 15443  
      replicaCount: 1  
      resources:
        limits:
          cpu: '2'
          memory: 2G
        requests:
          cpu: 200m
          memory: 256Mi
      sds:
        enabled: true
        resources:
          requests:
            cpu: 100m
            memory: 128Mi
          limits:
            cpu: 2000m
            memory: 1024Mi
      serviceType: LoadBalancer  
      affinity:
            podAntiAffinity:
              preferredDuringSchedulingIgnoredDuringExecution:
              - podAffinityTerm:
                  labelSelector:
                    matchExpressions:
                    - key: app
                      operator: In
                      values:
                      - istio-ingressgateway-1
                  topologyKey: topology.kubernetes.io/zone
                weight: 100 
      rollingMaxSurge: "100%"
      rollingMaxUnavailable: "25%"
    • preferredDuringSchedulingIgnoredDuringExecution:表示Pod反親和性為軟親和性。在調度Pod到節點的時候,如果沒有滿足所設置要求,也可以繼續調度Pod。

    • matchExpressions:設置keyappoperatorInvaluesistio-ingressgateway-1,表示Pod不能和包含app=istio-ingressgateway-1標簽的Pod部署在一個可用區上,即一個可用區只能部署一個包含app=istio-ingressgateway-1標簽的Pod。

    • topologyKey:設置Pod反親和性生效的維度。

      本例設置topology.kubernetes.io/zone,表示在可用區拓撲域中生效。

ACK Serverless集群中增強ASM網關高可用性

ACK Serverless集群不支持Pod反親和調度策略,但是您可以在ACK Serverless集群下創建ECI Pod ,使之分布在不同的可用區,從而增強ASM網關高可用性。

  1. ACK Serverless集群中配置多個可用區。具體操作,請參見創建多可用區的ECI Pod

  2. 在ASM網關中使用pod annotation關聯可用區。

    apiVersion: istio.alibabacloud.com/v1beta1
    kind: IstioGateway
    metadata:   
      name: ingressgateway
      namespace: istio-system
    spec:  
      clusterIds:
        - "c954ee9df88f64f229591f0ea4c61****"
      cpu: 
        targetAverageUtilization: 80
      externalTrafficPolicy: Local
      maxReplicas: 4
      minReplicas: 2  
      ports:  
      - name: status-port
        port: 15020    
        targetPort: 15020  
      - name: http2    
        port: 80    
        targetPort: 80  
      - name: https    
        port: 443    
        targetPort: 80
      - name: tls    
        port: 15443    
        targetPort: 15443  
      replicaCount: 1  
      resources:
        limits:
          cpu: '2'
          memory: 2G
        requests:
          cpu: 200m
          memory: 256Mi
      sds:
        enabled: true
        resources:
          requests:
            cpu: 100m
            memory: 128Mi
          limits:
            cpu: 2000m
            memory: 1024Mi
      serviceType: LoadBalancer  
      podAnnotations:
        k8s.aliyun.com/eci-vswitch: "vsw-bp1b07j0miob3khtn****,vsw-bp12b85hh323se8ft****"
        k8s.aliyun.com/eci-schedule-strategy: "VSwitchRandom"
      rollingMaxSurge: "100%"
      rollingMaxUnavailable: "25%"
    • k8s.aliyun.com/eci-vswitch:對應VPC下的不同的交換機ID,用于關聯可用區。

    • k8s.aliyun.com/eci-schedule-strategy:設置ECI調度策略。本文中必須使用VSwitchRandom策略,即使用隨機的方式將ECI Pod調度到多個可用區。