ingress的host不填写时,可以访问集群中任意一节点的80端口

apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: web-ingress
spec:
  rules:
  - host:   #转发域名
    http:
      paths:
      - path: /
        backend:
          serviceName: tomcat
          servicePort: 8080  #service的端口servicePort: 80  #service的端口
      - path: /nginx
        backend:
          serviceName: nginx
          servicePort: 80
Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐