Question
Deploy an Ingress resource called wildcard-host-ingress with following configuration:
Host *.video.example.com
Service video-service
Path /
Port 8080
Host *.web.example.com
Path /
Service web-service
Port 9090
AnswerapiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: wildcard-host-ingress
spec:
rules:
- host: "*.video.example.com"
http:
paths:
- pathType: Prefix
path: "/"
backend:
service:
name: video-service
port:
number: 8080
- host: "*.web.example.com"
http:
paths:
- pathType: Prefix
path: "/"
backend:
service:
name: web-service
port:
number: 9090