赞
踩
在 192.168.4.4 物理服务器上部署 WEB服务器 端口80.
外网IP80端口直接指向ingress-nginx。
域名指向 ingress-nginx ip 可以访问到局域网内物理搭建的web服务器,而非容器。
主要利用自定义Endpoints资源,指向局域网服务器。
apiVersion: v1 kind: Endpoints metadata: name: proxy-ingress subsets: - addresses: - ip: 192.168.4.4 ports: - port: 80 protocol: TCP --- apiVersion: v1 kind: Service metadata: labels: app: proxy-ingress name: proxy-ingress spec: ports: - port: 80 targetPort: 80 protocol: TCP sessionAffinity: None type: ClusterIP --- apiVersion: extensions/v1beta1 kind: Ingress metadata: name: proxy-ingress spec: rules: - host: proxy.abc.com http: paths: - path: / backend: serviceName: proxy-ingress servicePort: 80
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。