You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Open-IM-Server/deploy_k8s/ingress.yaml

116 lines
3.1 KiB

3 years ago
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
2 years ago
kubernetes.io/ingress.class: "nginx"
3 years ago
nginx.ingress.kubernetes.io/proxy-http-version: "1.1"
nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"
2 years ago
# 使用重写后的路径进行路由
nginx.ingress.kubernetes.io/use-regex: "true"
nginx.ingress.kubernetes.io/rewrite-target: "/$1"
2 years ago
name: sdk-server-ingress
3 years ago
spec:
rules:
2 years ago
- host: k8s.open-im-test.rentsoft.cn
3 years ago
http:
paths:
- backend:
service:
name: sdk-server
port:
2 years ago
number: 10003
2 years ago
path: /sdk-server/(.*)
3 years ago
pathType: Prefix
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
2 years ago
kubernetes.io/ingress.class: "nginx"
3 years ago
nginx.ingress.kubernetes.io/proxy-http-version: "1.1"
nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"
2 years ago
# 使用重写后的路径进行路由
2 years ago
# nginx.ingress.kubernetes.io/use-regex: "true"
# nginx.ingress.kubernetes.io/rewrite-target: "/$1"
2 years ago
name: msg-gateway-ingress
3 years ago
spec:
rules:
2 years ago
- host: k8s.open-im-test.rentsoft.cn
3 years ago
http:
paths:
- backend:
service:
2 years ago
name: msg-gateway
2 years ago
port:
number: 10001
2 years ago
path: /
3 years ago
pathType: Prefix
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
2 years ago
annotations:
kubernetes.io/ingress.class: "nginx"
2 years ago
# 使用重写后的路径进行路由
2 years ago
nginx.ingress.kubernetes.io/use-regex: "true"
nginx.ingress.kubernetes.io/rewrite-target: "/$1"
2 years ago
name: api-ingress
3 years ago
spec:
rules:
2 years ago
- host: k8s.open-im-test.rentsoft.cn
3 years ago
http:
paths:
- backend:
service:
name: api
port:
2 years ago
number: 10002
2 years ago
path: /api/(.*)
3 years ago
pathType: Prefix
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
2 years ago
annotations:
kubernetes.io/ingress.class: "nginx"
2 years ago
# 使用重写后的路径进行路由
2 years ago
nginx.ingress.kubernetes.io/use-regex: "true"
nginx.ingress.kubernetes.io/rewrite-target: "/$1"
2 years ago
name: demo-ingress
2 years ago
spec:
rules:
2 years ago
- host: k8s.open-im-test.rentsoft.cn
2 years ago
http:
paths:
- backend:
service:
name: demo
port:
number: 10004
2 years ago
path: /demo/(.*)
2 years ago
pathType: Prefix
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
2 years ago
annotations:
kubernetes.io/ingress.class: "nginx"
2 years ago
# 使用重写后的路径进行路由
2 years ago
nginx.ingress.kubernetes.io/use-regex: "true"
nginx.ingress.kubernetes.io/rewrite-target: "/$1"
2 years ago
name: cms-api-ingress
2 years ago
spec:
rules:
2 years ago
- host: k8s.open-im-test.rentsoft.cn
2 years ago
http:
paths:
- backend:
service:
name: cms-api
port:
number: 10006
2 years ago
path: /cms-api/(.*)
2 years ago
pathType: Prefix