Tanumoy Ghosh:
In Lightning Lab 2, for ingress question - while trying connecting to apparels url, it’s saying 404 whereas video url is giving 200, please suggest, details in thread
Tanumoy Ghosh:
$ cat ing.yaml
apiVersion: <http://networking.k8s.io/v1|networking.k8s.io/v1>
kind: Ingress
metadata:
name: ingress-vh-routing
spec:
rules:
- host: <http://watch.ecom-store.com|watch.ecom-store.com>
http:
paths:
- pathType: Prefix
path: /video
backend:
service:
name: video-service
port:
number: 8080
- host: apparels.ecom-store
http:
paths:
- pathType: Prefix
path: /wear
backend:
service:
name: apparels-service
port:
number: 8080
Tanumoy Ghosh:
$ curl -v <http://apparels.ecom-store.com:30093/wear>
* Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to <http://apparels.ecom-store.com|apparels.ecom-store.com> (127.0.0.1) port 30093 (#0)
> GET /wear HTTP/1.1
> Host: <http://apparels.ecom-store.com:30093|apparels.ecom-store.com:30093>
> User-Agent: curl/7.58.0
> Accept: */*
>
< HTTP/1.1 404 Not Found
< Server: nginx/1.17.8
< Date: Sat, 15 May 2021 15:07:57 GMT
< Content-Type: text/html
< Content-Length: 153
< Connection: keep-alive
<
<html>
<head><title>404 Not Found</title></head>
<body>
<center><h1>404 Not Found</h1></center>
<hr><center>nginx/1.17.8</center>
</body>
</html>
* Connection #0 to host <http://apparels.ecom-store.com|apparels.ecom-store.com> left intact
satheesh:
8080, check the service’s port
Rahul:
- host: apparels.ecom-store
Rahul:
host name is wrong. add “.com” to it
Tanumoy Ghosh:
Good catch! Thanks Rahul
Port is correct Satheesh