In topology.rules.nodeSelectors, you can define a set of predefined node selectors and then reference them in the subsequent topology.rules.components. For the definition method and meaning of node selectors, refer to the official documentation.

spec:
  topology:
    rules:
      selectors:
      - name: zone-a
        nodeSelector:
          nodeSelectorTerms:
          - matchExpressions:
            - key: topology.kubernetes.io/zone
              operator: In
              values:
              - cn-hangzhou-a
      - name: zone-b
        nodeSelector:
          nodeSelectorTerms:
          - matchExpressions:
            - key: topology.kubernetes.io/zone
              operator: In
              values:
              - cn-hangzhou-b
      - name: zone-c
        nodeSelector:
          nodeSelectorTerms:
          - matchExpressions:
            - key: topology.kubernetes.io/zone
              operator: In
              values:
              - cn-hangzhou-c

Node selectors can help us control the deployment topology of instances, such as two-site three-center, three-site five-center, etc. For specific usage, refer to: Disaster Recovery Deployment Example.

results matching ""

    No results matching ""