This is my ingress service config file.
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ingress-srv
spec:
ingressClassName: nginx
rules:
- host: products.com
http:
paths:
- path: /list
pathType: ImplementationSpecific
backend:
service:
name: products-srv
port:
number: 4000
Here, I am trying to pass all of my requests on products.com/list
to the service products-srv
. I've created a ClusterIP
service as well.
After that, I've also added 127.0.0.1 products.com
to the /etc/hosts
file.
My problem is: When I am trying to access the products.com
with my browser, then it is showing a 404 Not Found
error. Anyone suggest me a solution please?