- 环境查看
系统环境
软件环境
- 安装Ingress
如果在第一次创建集群则在高级选项选择启用Ingress
如果第一次创建时没有安装Ingress则编辑集群选择即可
选择之后集群自动更新
查看Ingress创建的Pod
默认创建在每个节点都会创建一个Pod
设置在其中的两个节点创建
添加节点标签
编辑节点配置
添加一个标签使用该标签让Pod部署到该节点
添加一个污点让其他Pod不部署到该节点
本次设置两个节点作为Ingress的节点
编辑Ingress配置
设置完成以后只会把Ingress部署到对应的两个节点
- 创建Deployment和Service
- 创建Deployment和Service测试Ingress
- 查看创建好的service
- 创建Ingress
创建Ingress
设置该Ingress对应的后端service即上一步设置的service名
访问测试
需设置hosts或者是设置了公网域名映射
如果是https则先添加证书至sercert