apache / apisix-ingress-controller

APISIX Ingress Controller for Kubernetes

Home Page:https://apisix.apache.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

request help: 502 Bad Gateway while requesting an Ingress resource

Gitttttttt opened this issue · comments

Issue description

services like this:
image

ingress like this:
image

After applying the above Ingress, I send a request like this(10.18.100.70 is master node):
image

The apisix pod showed me error logs:
image

Environment

  • your apisix-ingress-controller version (output of apisix-ingress-controller version --long): 1.7.0
  • your Kubernetes cluster version (output of kubectl version): 1.22.15
  • if you run apisix-ingress-controller in Bare-metal environment, also show your OS version (uname -a):

@Gitttttttt I see you are trying to send the request to port 8081 on the httpbin service but the port configured is 80

@Revolyssup yes, there are two httpbin services, another with 8081 port is in test namespace, But I found the port of httpbin pod must be 80, if I run with kubectl expose pod httpbin --port 8081, it can not be accessed.

Now I have redeployed httpbin service and apisix, and I created an Ingress, but how should I access the httpbin service? It showed me 404 Not Found when I send a request bymaster node ip : apisix-gateway node port
image

The apisix pod log like this:
image

pbin serv

Hear your Host is wrong. Set it the same as you have set in Ingress

@Revolyssup One more question, If I modify the path as follows, it response 404 Not Found:
image

image

But if I set path to /, it goes right, I'm confused, so is there any document for the pathType? thanks!
image
image

@Revolyssup One more question, If I modify the path as follows, it response 404 Not Found: image

image

But if I set path to /, it goes right, I'm confused, so is there any document for the pathType? thanks! image image

The routing is fine. httpbin service doesn't have a route /namespace/test/cookies. The 404 is from httpbin service and not APISIX

ok, thanks very much