High available for ovn db

OVN support clustered database. If want to use high-available database in kube-ovn,
modify ovn-central deployment in yamls/ovn.yaml.

Change the replicas to 3, and add NODE_IPS environment var points to node that has label kube-ovn/role: "master".

  1. replicas: 3
  2. containers:
  3. - name: ovn-central
  4. image: "index.alauda.cn/alaudak8s/kube-ovn-db:v1.0.1"
  5. imagePullPolicy: Always
  6. env:
  7. - name: POD_IP
  8. valueFrom:
  9. fieldRef:
  10. fieldPath: status.podIP
  11. - name: NODE_IPS
  12. value: 192.168.55.10, 192.168.55.11, 192.168.55.12
  1. ovn-central-fbdbd9d4d-jv8cr 1/1 Running 0 19h # waiting to become a leader
  2. ovn-central-fbdbd9d4d-pgvhl 1/1 Running 0 19h # waiting to become a leader
  3. ovn-central-fbdbd9d4d-rk2c7 1/1 Running 0 19h # the leader now

More detail about ovsdb cluster mode please refer to this link