Skip to content

Deploy VelaD with High Availability

qiaozp edited this page Aug 10, 2022 · 1 revision

You can use VelaD to build KubeVela control plane with higher availability. It consists of:

  1. More than two nodes as server nodes.
  2. One database (Could be MySQL/MariaDB, PostgreSQL, etcd)
  3. One linux node as load balancer.

image

We only need run several commands on different nodes.

Setup server nodes

First node

On the first server node, run

velad install --bind-ip=<LB_IP> --database-endpoint=<DB_ENNDPOINT> --token=<TOKEN>

<LB_IP> is IP of load balancer node. We'll setup it later. Passing it to bind-ip helps VelaD generate right kubeconfig.

<TOKEN> is optional. Token will be generated if you don't use this argument. VelaD will print generated or given token after install.

<DB_ENDPOINT> is the database connection string. The format is here.

You need to setup database before and make sure all your server nodes can access it.

Other nodes

On the other node, you need to run velad install with the same arguments and one more: --start. --start means skip install KubeVela and only start node. These nodes belong to one cluster and don't install KubeVela repeatedly.

velad install --bind-ip=<LB_IP> --database-endpoint=<DB_ENNDPOINT>\
              --token=<TOKEN> \
              --start

<TOKEN> should be the same with that in first node.

Setup load balancer

On load balancer node, run

velad load-balancer install --host=<IP1>,<IP2>,<IP3>

<IPx> is IPs of server nodes. This will call package manager of system to install nginx and setup it for forwarding the network traffic to server nodes.

Access cluster

Run command below on any server nodes. Copy the file to any computer which can access the load balancer.

velad kubeconfig --external

Boom! You can access the KubeVela control plane with this kubeconfig. Failure of any single server won't affect the availability of the control plane.