Skip to content

[question] How to set pod anti affinity to ensure high availability? #371

Open
@runkecheng

Description

@runkecheng

General Question

How to set pod anti affinity?

It is necessary to ensure that the database node is scheduled in different workers, you can refer to the following configuration of the anti-affinity of POD.

podPolicy:
    ...
  affinity: 
    podAntiAffinity:
      requiredDuringSchedulingIgnoredDuringExecution:
      - labelSelector:
          matchExpressions:
          - key: mysql.radondb.com/cluster
                operator: In
                values:
                - sample 
            topologyKey: "kubernetes.io/hostname"

Metadata

Metadata

Labels

Q&ACommon problems and answers.questionFurther information is requested

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions