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

ingress-nginx-controller-v1.7.1 【Could not resolve host: test.leo.me; Unknown error】 #10014

Closed
Saltwater-leo opened this issue May 30, 2023 · 7 comments
Labels
kind/support Categorizes issue or PR as a support question. needs-priority needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.

Comments

@Saltwater-leo
Copy link

Except for the *. localdev.me domain name, other created ingress domain names cannot be resolved

`[root@k8s-master-01 ingress]# kubectl describe ingress test-localhost
Name: test-localhost
Labels:
Namespace: default
Address: 10.101.221.21
Ingress Class: nginx
Default backend:
Rules:
Host Path Backends


test.leo.me
/ test:80 (10.244.1.54:80)
Annotations:
Events:
Type Reason Age From Message


Normal Sync 11m (x2 over 11m) nginx-ingress-controller Scheduled for sync
[root@k8s-master-01 ingress]#
[root@k8s-master-01 ingress]# curl test.leo.me
curl: (6) Could not resolve host: test.leo.me; Unknown error
[root@k8s-master-01 ingress]#
[root@k8s-master-01 ingress]# kubectl describe ingress demo-localhost
Name: demo-localhost
Labels:
Namespace: default
Address: 10.101.221.21
Ingress Class: nginx
Default backend:
Rules:
Host Path Backends


demo.localdev.me
/ demo:80 (10.244.1.34:80)
Annotations:
Events:
[root@k8s-master-01 ingress]# curl demo.localdev.me
See Other.

[root@k8s-master-01 ingress]#
`

@Saltwater-leo Saltwater-leo added the kind/bug Categorizes issue or PR as related to a bug. label May 30, 2023
@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label May 30, 2023
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If Ingress contributors determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@tao12345666333
Copy link
Member

Please describe the specific steps and expected behavior clearly. I don't understand the content of your issue. Also, please format all outputs.

@tao12345666333
Copy link
Member

/remove-kind bug

@k8s-ci-robot k8s-ci-robot added needs-kind Indicates a PR lacks a `kind/foo` label and requires one. and removed kind/bug Categorizes issue or PR as related to a bug. labels May 30, 2023
@Saltwater-leo
Copy link
Author

  1. After installing ingress nginx,

  2. Create depoyment 、service & ingress:

[root@k8s-master-01 ingress]# kubectl create deployment test --image=httpd --port=80
deployment.apps/test created
[root@k8s-master-01 ingress]# kubectl expose deployment test
service/test exposed
[root@k8s-master-01 ingress]# kubectl create ingress test-localhost --class=nginx --rule="test.leo.com/*=test:80"
ingress.networking.k8s.io/test-localhost created
[root@k8s-master-01 ingress]# curl test.leo.com
curl: (6) Could not resolve host: test.leo.com; Unknown error

Expected: Service can be accessed through domain name “test.leo.com”

Actual result: Unable to resolve domain name

Reference address: https://kubernetes.github.io/ingress-nginx/deploy/#quick -Start

@longwuyuan
Copy link
Contributor

longwuyuan commented May 30, 2023

Show the below info ;

  • host test.leo.com
  • kubectl get svc -A -o wide

That docs page assumes awareness of DNS and basic understanding of routing a http request packet to the service created by the ingess-controller installation. Your latest update hints you have'nt got the DNS and the routing part taken care of.

Based on the ouput of the commands I requested, you can get expected response by eithr of below 3 changes ;

  • using the --resolve flag of curl (check man curl)
  • creating a /etc/hosts entry for test.leo.com
  • overkill but making a DNS server entry for test.leo.com

We could edit that docs page and add details about the service type created by the ingress-nginx installation. And also add text about checking that service status. But all of that is assumed to be known to a user. Docs like shown below are related to this
image

https://kubernetes.io/docs/concepts/services-networking/ingress/

I will try to add some text on that docs page or you can submit a PR to improve that docs page

@longwuyuan
Copy link
Contributor

/kind support

If you still can not fix it, please come discuss this on kubernetes.slack.com. Register at slack.k8s.io if required. Traditionally its better to track bugs and suspected bugs, new feature requests or clearly demonstrated problems, because there is less resources here and lots of engineers and users on slack.

@k8s-ci-robot k8s-ci-robot added kind/support Categorizes issue or PR as a support question. and removed needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels May 30, 2023
@Saltwater-leo
Copy link
Author

Thank you very much, my friend

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/support Categorizes issue or PR as a support question. needs-priority needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.
Projects
Archived in project
Development

No branches or pull requests

4 participants