-
Notifications
You must be signed in to change notification settings - Fork 688
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
Is there a more secure way to allow ALBs to health-check Envoy? #3201
Comments
Envoy does not have a good way to expose only a health-check for the proxy itself at the moment, agreed. As you suggest, you can fake this a bit by having a very simple service as a fallback and configure a default backend. Currently, the easiest way to do that is actually with the Ingress object, which allows you to specify an Ingress with no hostname match, and backends with no route match, making it the default. We also have the option of a fallback certificate, for if you only wish to expose HTTPS, but your health checker doesn't support SNI (I have no idea if ALBs support this). See https://projectcontour.io/docs/v1.11.0/config/tls-termination/#fallback-certificate for details. Sorry to not have a better answer for you right now, this is definitely an area which could use some further work. |
@kevincantu so the listener This static listener doesn't expose the other |
The other benefit to using Envoy's built-in /ready endpoint is that it tells you when Envoy has started a draining process which is important to tell the downstream LB that Envoy is starting to shutdown and to stop sending new connections to it, where you wouldn't get that with just a dummy app sitting behind Envoy. |
OK, that's great! |
Following up on old issues, @kevincantu, is there anything more on this one? Sorry to have led you astray, and thanks @stevesloka for the correction. |
Well, I've changed companies and not quite yet talked the new team into migrating everything to Contour, so things are good on my end! My former team will probably be following up and can confirm when it all works! |
Thanks for that @kevincantu, I'll close this one for now then, we can reopen if needed. |
We have been happily using Contour+Envoy behind some NLBs for a while, now, but I recently spent some time exploring ALB usage: I'd like to set up some WAF ACLs. I've been able to get connections going after the hurdles of:
dnsPolicy: ClusterFirstWithHostNet
andhostNetwork: true
(and no k8s service for Envoy),8002
so I can have the ALB's make HTTP connections to/ready
to health-check the nodes.Now that works, but I'm not satisfied, because it would seem to expose a whole lot more things than /ready on that port! This would leave me one bad AWS Security Group rule away from giving Envoy's admin interface to the world.
Can you think of a safer way to expose Contour+Envoy for health-checking from ALBs?
Is there a way to define a default backend, so that when an ALB sends over a bogus (or just the IP) host header when health-checking, I can deploy a little toy app to respond 200 OK that has actually exercised Envoy?
The text was updated successfully, but these errors were encountered: