kubernetes-yaml/description/Service/Ingress/example-multi.yml

32 lines
662 B
YAML
Raw Normal View History

2023-12-15 16:39:01 +08:00
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: example-ingress-multi
namespace: demo
labels:
name: example-ingress-multi
app: ingress
type: ingress
spec:
rules:
- host: "foo.bar.com"
http:
paths:
- pathType: Prefix
path: "/bar"
backend:
service:
name: service1
port:
number: 80
- host: "*.foo.com"
http:
paths:
- pathType: Prefix
path: "/foo"
backend:
service:
name: service2
port:
number: 80