4.8. 配置负载均衡资源代理
创建健康探测后,您必须配置负载均衡器资源代理。此资源代理运行一个服务,它响应来自 Azure 负载均衡器的健康探测请求,并删除不响应的集群节点。
先决条件
- 您已完成 创建 Azure 负载均衡器 的过程。
流程
在所有节点上安装
nmap-ncat资源代理:# dnf install nmap-ncat resource-agents-cloud在单个节点上执行以下步骤:
使用
IPaddr2地址的FrontendIP负载均衡器来创建pcs资源和组:# pcs resource create resource-name IPaddr2 ip="10.0.0.7" --group <cluster_resources_group>配置
load balancer资源代理:# pcs resource create resource-loadbalancer-name azure-lb port=port-number --group <cluster_resources_group>
验证
运行
pcs status来查看结果。[root@node01 clouduser]# pcs status Cluster name: clusterfence01 Stack: corosync Current DC: node02 (version 1.1.16-12.el7_4.7-94ff4df) - partition with quorum Last updated: Tue Jan 30 12:42:35 2018 Last change: Tue Jan 30 12:26:42 2018 by root via cibadmin on node01 3 nodes configured 3 resources configured Online: [ node01 node02 node03 ] Full list of resources: clusterfence (stonith:fence_azure_arm): Started node01 Resource Group: g_azure vip_azure (ocf::heartbeat:IPaddr2): Started node02 lb_azure (ocf::heartbeat:azure-lb): Started node02 Daemon Status: corosync: active/disabled pacemaker: active/disabled pcsd: active/enabled