Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get which url redirect to default backend #3603

Closed
lw8008 opened this issue Dec 27, 2018 · 4 comments · Fixed by #3780
Closed

How to get which url redirect to default backend #3603

lw8008 opened this issue Dec 27, 2018 · 4 comments · Fixed by #3780

Comments

@lw8008
Copy link

lw8008 commented Dec 27, 2018

Is this a request for help? (If yes, you should use our troubleshooting guide and community support channels, see https://kubernetes.io/docs/tasks/debug-application-cluster/troubleshooting/.):

What keywords did you search in NGINX Ingress controller issues before filing this one? (If you have found any duplicates, you should instead reply there.):


Is this a BUG REPORT or FEATURE REQUEST? (choose one):
FEATURE REQUEST

NGINX Ingress controller version:
nginx-ingress-controller:0.18.0

startup conf:
args:
- /nginx-ingress-controller
- --default-backend-service=$(POD_NAMESPACE)/default-http-backend
...

Kubernetes version (use kubectl version):
1.11.1

Environment:
Private Data Center

  • Cloud provider or hardware configuration:
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

What happened:
It sems i can't get those access which redirect to default backend since no endpoint added in both access.log and error.log of Ingress.

What you expected to happen:
Could you pls guide me if i need additional config in Ingress or not support by default and need use my own default backend to log this?

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know:

@aledbf
Copy link
Member

aledbf commented Dec 27, 2018

@lw8008 I am sorry but what are you trying to do exactly?

@lw8008
Copy link
Author

lw8008 commented Dec 27, 2018

@aledbf thanks for your quick response.
for example, if ingress get access with URL abc.test.com.
but we don't config any ingress to serve this request, then it will go to default-backend-service.
but seems such kind of redirect will not log in access.log or error.log, right?

if i want to get those "invalid" access url, what's your suggestion?

@aledbf
Copy link
Member

aledbf commented Dec 27, 2018

@lw8008 that is correct. You will see a 404 in the log but no redirect because there is no one. When there is no endpoints, the controller replaces the service with default backend

@lw8008
Copy link
Author

lw8008 commented Dec 28, 2018

Thank @aledbf

But it seems i can't get 404 in the access.log for those access replaces with default backend.

Here is my nginx-ingress-controller:0.18.0 startup parameter:
args:
- /nginx-ingress-controller
- --default-backend-service=$(POD_NAMESPACE)/default-http-backend
- --configmap=$(POD_NAMESPACE)/nginx-configuration
- --tcp-services-configmap=$(POD_NAMESPACE)/tcp-services
- --udp-services-configmap=$(POD_NAMESPACE)/udp-services
- --publish-service=$(POD_NAMESPACE)/ingress-nginx-default
- --annotations-prefix=nginx.ingress.kubernetes.io
- --logtostderr=false
- --alsologtostderr=true
- --log_dir=/var/log/nginx
- --healthz-port=23254
- --http-port=23000
- --https-port=23443
- --watch-namespace=
- --ingress-class=default

i'm wondering if i miss some config?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants