Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: optimize the multi-node cluster usage #126

Merged
merged 11 commits into from
Feb 22, 2023

Conversation

chivalryq
Copy link
Member

@chivalryq chivalryq commented Feb 20, 2023

Optimize the multi-node cluster use

  1. Run on first master node:
velad install --database-endpoint="mysql://root:@tcp(<HOST>:<PORT>)/velad_ha" --bind-ip=<LB_IP> --node-ip=<IP1> --token=<TOKEN> 
  1. Run on second master node:
velad install --database-endpoint="mysql://root:@tcp(<HOST>:<PORT>)/velad_ha" --bind-ip=<LB_IP> --node-ip=<IP2> --token=<TOKEN> --cluster-only
  1. Run on either first or second node:
velad load-balancer wizard

Result, the ports can be different.

To setup load-balancer, run the following command on node acts as load-balancer:
  velad load-balancer install --http-port 32196 --https-port 30297 --host=<IP1>,<IP2>
  1. Run on load balancer node:
velad load-balancer install --http-port 32196 --https-port 30297 --host=<IP1>,<IP2>
  1. Done! Your multi-node VelaD cluster is setup and you can now not only control cluster but also use Ingress in cluster. The flow is forwarded by load balancer node to VelaD cluster.

Note

  1. You can replace a load balancer node with a LB service in cloud vendor.
  2. Although you can create LoadBalancer type Service, the flow is not forwarded by load balancer node. In another word, you can only access it directly by master's IP.

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
@chivalryq chivalryq changed the title Fix: service and ingress ip is wrong when using lb Feat: optimize the multi-node cluster usage Feb 21, 2023
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

wait nginx to quit

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

fix stop nginx error

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
@chivalryq chivalryq merged commit 57d26ff into kubevela:main Feb 22, 2023
@chivalryq chivalryq deleted the fix/svc-ing-ip branch February 22, 2023 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants