Ingress.yaml
Posted wenlin-gk
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Ingress.yaml相关的知识,希望对你有一定的参考价值。
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: aip-ingress
namespace: default
annotations:
#/tm/api/v1/datas --> /api/v1/datas
nginx.ingress.kubernetes.io/rewrite-target: /
kubernetes.io/ingress.class: "nginx"
spec:
rules:
# 为了避免多个ingress占用同一个host,此项必须配(默认*)
- host: aip.ingress
http:
paths:
- path: /tm
backend:
serviceName: zaip-tenant-manager
servicePort: 7090
- path: /rm
backend:
serviceName: ai-rm-service
servicePort: 8050
资料:
https://kubernetes.github.io/ingress-nginx/
https://kubernetes.io/docs/concepts/services-networking/ingress/
为什么一定需要配host参数?
https://github.com/nginxinc/kubernetes-ingress/issues/209
以上是关于Ingress.yaml的主要内容,如果未能解决你的问题,请参考以下文章