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

No upstream for LoadBalancer type services #1670

Closed
zihaoyu opened this issue Nov 8, 2017 · 1 comment
Closed

No upstream for LoadBalancer type services #1670

zihaoyu opened this issue Nov 8, 2017 · 1 comment

Comments

@zihaoyu
Copy link

zihaoyu commented Nov 8, 2017

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/.): No

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.): LoadBalancer


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

NGINX Ingress controller version:
0.9.0-beta.11

Kubernetes version (use kubectl version):
1.7.6

Environment:

  • Cloud provider or hardware configuration: AWS
  • OS (e.g. from /etc/os-release): Container Linux by CoreOS 1465.8.0 (Ladybug)
  • Kernel (e.g. uname -a): Linux ip-10-72-32-26.us-west-2.compute.internal 4.12.14-coreos Basic structure  #1 SMP Wed Sep 20 22:20:05 UTC 2017 x86_64 Intel(R) Xeon(R) CPU E5-2676 v3 @ 2.40GHz GenuineIntel GNU/Linux
  • Install tools:
  • Others:

What happened:
My service has ingress defined, and also service type LoadBalancer. When I hit the ingress controller with the hostname defined in ingress resource, I get 503. Upon inspecting the nginx conf file, I see that the upstream definition for that service is empty:

    upstream production-blackforest-80 {
        # Load balance algorithm; empty for round robin, which is the default
        least_conn;
        server 127.0.0.1:8181 max_fails=0 fail_timeout=0;
    }

It looks like this only happens to LoadBalancer type. NodePort and ClusterIP services have their pod IPs in upstreams.

What you expected to happen:

I can hit my service via ingress.

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

  1. Create a service with type LoadBalancer.
  2. Create an ingress rule for the service.
  3. Hit the ingress controller with the hostname defined in ingress rule.

Anything else we need to know:

@aledbf
Copy link
Member

aledbf commented Nov 8, 2017

Closing. Services of type=LoadBalancer are not valid. You need to use a normal service.

@aledbf aledbf closed this as completed Nov 8, 2017
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

No branches or pull requests

2 participants