ungleich-k8s/generic/ingress-test.yaml

101 lines
2.1 KiB
YAML
Raw Normal View History

2022-05-11 08:09:41 +00:00
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
selector:
matchLabels:
app: nginx-test
replicas: 2
template:
metadata:
labels:
app: nginx-test
spec:
containers:
- name: nginx
image: nginx:1.20.0-alpine
ports:
- containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: nginx-test-service
spec:
selector:
app: nginx-test
ports:
- protocol: TCP
port: 80
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: example-ingress
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
ingressClassName: nginx
rules:
- host: big.cdn.hjk.li
http:
paths:
- path: /(images|videos)/.*
pathType: Prefix
backend:
service:
name: nginx-test-service
port:
number: 80
- host: dynamic.cdn.hjk.li
2022-08-05 19:45:39 +00:00
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: nginx-test-service
port:
number: 80
2022-08-21 20:19:19 +00:00
- host: 2022-08-01.cdnv4.hjk.li
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: nginx-test-service
port:
number: 80
- host: 2022-08-01-2.cdn.hjk.li
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: nginx-test-service
port:
number: 80
- host: 2022-08-01-2.cdnv4.hjk.li
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: nginx-test-service
port:
number: 80
- host: "*.cdnv4.hjk.li"
2022-08-05 19:45:39 +00:00
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: nginx-test-service
port:
number: 80