IngressGateway服务(入口网关服务)必须监听上节介绍的所有端口,以便能够将流量转发到IngressGateway pod上。Kubernetes服务不是“真正的”服务,该请求将由Kubernetes提供的kube-proxy转发到具有运行对应pod的节点上。在节点上,IP table配置将请求转发到适当的pod:
ports:
- name: http2
nodePort: 30000
port: 80
protocol: TCP
- name: https
nodePort: 30443
port: 443
protocol: TCP
- name: mysql
nodePort: 30306
port: 3306
protocol: TCP