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

LoadBalancer vs NodePort with manualy setup LB (haproxy.cfg difference) #867

Closed
KresoDenis opened this issue Feb 13, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@KresoDenis
Copy link

commented Feb 13, 2018

Ok. So i have set type LoadBalancer and it works. I decided to setup TCP LoadBalancer on Azure by myself instead of leaving it to Kubernetes so i Created my own LB which works and switched voyager ingress anotation to NodePort and backends to use 31443 nodeport.

And i expected it to work the same. But im getting.

<html><body><h1>503 Service Unavailable</h1>
No server is available to handle this request.
</body></html>

from voyagers haproxy

So my request is basicly to https://api.mydomain.com (443 of course)

Difference is:

acl host_acl_test.mydomain.com hdr(host) -i test.mydomain.com
acl host_acl_test.mydomain.com hdr(host) -i test.mydomain.com:443
...
acl host_acl_api.mydomain.com hdr(host) -i api.mydomain.com
acl host_acl_api.mydomain.com hdr(host) -i api.mydomain.com:443

becomes this (up is LoadBalancer type, down is NodePort type)

acl host_acl_test.mydomain.com hdr(host) -i test.mydomain.com:31443
...
acl host_acl_api.mydomain.com hdr(host) -i api.mydomain.com:31443

with addition of

acl host_acl_ hdr(host) -i :32499

when nodeport used

backend config have this

    http:
      port: 443     
      nodePort: '31443' 

Any ideas how to make it work same with NodePort. That is to generate same config as on LoadBalalncer type.

It seems to work with if i send header "Host:api.mydomain.com:31443".
Shouldnt it accept also domain 'api.mydomain.com'

@KresoDenis KresoDenis changed the title LoadBalancer vs NodePort with manualy setup LB (haproxy difference) LoadBalancer vs NodePort with manualy setup LB (haproxy.cfg difference) Feb 13, 2018

@tamalsaha

This comment has been minimized.

@KresoDenis

This comment has been minimized.

Copy link
Author

commented Feb 14, 2018

Yep.

Setting

ingress.appscode.com/force-service-port: 'true'

made it work. I was searching docs for something similar but finding 'terms' for relevant thing is not always simple task.

I did also looked for all supported annotations here:
https://appscode.com/products/voyager/5.0.0-rc.11/guides/ingress/configuration/annotations/

and its not mentioned. But big thanks.

@KresoDenis KresoDenis closed this Feb 14, 2018

@tamalsaha

This comment has been minimized.

Copy link
Member

commented Feb 14, 2018

@KresoDenis , glad that you got it to work. In 6.0.0-rc.0 release, we have reversed the behavior and it is documented here: https://appscode.com/products/voyager/6.0.0-rc.0/concepts/ingress-types/nodeport/#understanding-ingress-appscode-com-use-node-port-annotation

Regarding search, I am looking for a better /easy to use search engine tool. Finding stuff is difficult as-is . :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.