网站首页 文章专栏 05ingress.md
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: test
spec:
rules:
- host: foo.bar.com
http:
paths:
- backend:
serviceName: s1
servicePort: 80
- host: bar.foo.com
http:
paths:
- backend:
serviceName: s2
servicePort: 80
spec.rules[].host
指定访问的域名spec.rules[].http.paths[].backend.serviceName
筛选指定的servicespec.rules[].http.paths[].backend.servicePort
指定service端口spec.rules[].http.paths[].backend
指定访问的path,需要web程序确实存在相应路径,可选