ingress-nginx配置多host指向相同后端

有时我们的需求是多个域名指向同个后端服务,那ingress-nginx该怎么配置,很简单如下:

spec:
  rules:
  - host: foobar.com
    http: &http_rules
      paths:
      - backend:
          serviceName: foobar
          servicePort: 80
  - host: api.foobar.com
    http: *http_rules
  - host: admin.foobar.com
    http: *http_rules
  - host: status.foobar.com
    http: *http_rules

 

上一篇:VUE--封装插件


下一篇:2、接口测试之fiddler使用