一、 记录一次ingress-controller扩容2副本不能正常拉起问题,之前测试环境部署了加速github的容器,忘记暴露端口80了
二、 hostIp:K8s组件如apiserver等,以及ingress-nginx-controller的多副本,pod和主机共享IP(共享主机网络ingress-nginx-controller的多副本之间通信不走kube-proxy),并且ingress-nginx-controller暴露nodeport接收流量,所以生产一定要记得做负载均衡!(而istio出入站组件不共享主机IP,只暴露LoadBalancer端口
负载均衡之前
负载均衡之后
三、ingress-controller验证
ingress-controller暴露的nodeport及其作用
1. 验证:通过端口接收流量
2. ingress-nginx-controller hostIp
3. 通过域名访问拿到路由规则结果