胡先生 (@hk3055) 在 基于K8s的微服务架构搭建完整方案 中发帖
基于K8s的微服务架构搭建完整方案
本次环境构建所有服务器操作系统均为 Ubuntu 22.04 LTS 最小安装版本
1 Nginx + KeepAlived 负载均衡和高可用环境
1.1 服务器列表
主机名称
IP地址
配置
角色
VIP
nginx-01
192.168.2.143
2c/8g/200g
master
192.168.2.170
nginx-02
192.168.2.144
2c/8g/200g
backup
192.168.2.170
1.2 安装Nginx
sudo apt-get install nginx -y
验证:
sudo nginx -t
# 输出
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration ...