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

Example service and ingress gives Unknown Host error #560

Closed
Starefossen opened this issue Nov 27, 2018 · 2 comments
Closed

Example service and ingress gives Unknown Host error #560

Starefossen opened this issue Nov 27, 2018 · 2 comments
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@Starefossen
Copy link

Starefossen commented Nov 27, 2018

I am following the instructions in the README.md.

Kubernetes/GKE version:

$ kubectl version
Client Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.3", GitCommit:"a4529464e4629c21224b3d52edfe0ea91b072862", GitTreeState:"clean", BuildDate:"2018-09-09T18:02:47Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"10+", GitVersion:"v1.10.9-gke.5", GitCommit:"d776b4deeb3655fa4b8f4e8e7e4651d00c5f4a98", GitTreeState:"clean", BuildDate:"2018-11-08T20:33:00Z", GoVersion:"go1.9.3b4", Compiler:"gc", Platform:"linux/amd64"}

Creating the GCE ingress controller:

$ kubectl create -f examples/deployment/gce-ingress-controller.yaml

I am verifying that the controller is in fact running:

$ kubectl get pods -n kube-system | grep gce
gce-ingress-5ffdd58b7c-j2qnx                        1/1       Running   0          45m

Next I am crating the example service and ingress:

$ kubectl create -f examples/multi-path/svc.yaml examples/multi-path/gce-multi-path-ingress.yaml

And verifying that they are in fact created:

$ kubectl get all
NAME                    READY     STATUS    RESTARTS   AGE
pod/echoheaders-4hhcf   1/1       Running   0          2m

NAME                                DESIRED   CURRENT   READY     AGE
replicationcontroller/echoheaders   1         1         1         2m

NAME                   TYPE       CLUSTER-IP      EXTERNAL-IP   PORT(S)        AGE
service/echoheadersx   NodePort   10.23.251.126   <none>        80:30301/TCP   2m
service/echoheadersy   NodePort   10.23.245.89    <none>        80:30284/TCP   2m

NAME      HOSTS                     ADDRESS         PORTS     AGE
echomap   foo.bar.com,bar.baz.com   35.241.43.197   80        4m

So far so good. Now accessing the Ingress Address directly http://35.241.43.197 gives the echoheadersx backend.

However any access using one of the configured hosts via curl or /etc/hosts results in an "Unknown Host" error like this:

$ curl -H "Host: foo.bar.com" http://35.241.43.197/foo
<HTML>
<HEAD>
<TITLE>Unknown Host</TITLE>
</HEAD>

<BODY BGCOLOR="white" FGCOLOR="black">
<H1>Unknown Host</H1>
<HR>

<FONT FACE="Helvetica,Arial"><B>
Description: Unable to locate the server requested ---
the server does not have a DNS entry.  Perhaps there is a misspelling
in the server name, or the server no longer exists.  Double-check the
name and try again.
</B></FONT>
<HR>
</BODY>

Any suggestions?

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Feb 25, 2019
@rramkumar1
Copy link
Contributor

@Starefossen Is this still an issue? I suspect that there is something going on w/ your DNS.

Given that, I'm going to go ahead and close this out. Please reopen if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

No branches or pull requests

4 participants