Solution
1 minute read
- The specification for the Ingress resource is as follows:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: vote
spec:
ingressClassName: traefik
rules:
- host: vote.votingapp.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: vote-ui
port:
number: 80
- host: result.votingapp.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: result-ui
port:
number: 80
- Deploy the application with the following command from the manifests directory:
kubectl apply -f .
You can then access the different interfaces using real domain names instead of a port number.


- Delete the application with the following command from the manifests directory:
kubectl delete -f .