-
Notifications
You must be signed in to change notification settings - Fork 743
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
Expose hostNetwork customization #99
Comments
Hello @rbtr, Thanks for opening this proposal. This is a topic that comes up fairly often, and there are definitely use cases where using hostNetwork/hostPort is useful. The first issue is that hostPort and hostNetwork configurations are discouraged, and usually not supported in production environments due to the issues they cause. The kubernetes best practices guide explicitly states this: https://kubernetes.io/docs/concepts/configuration/overview/#services I will respond to your scenarios one at a time to hopefully give some more insight:
Reducing cost shouldn't be a reason to add risk-introducing features.
If you are running on bare metal, you should be looking at metalLB or other solutions, because you will need to get traffic into your cluster in a reliable way, with failover taken into account.
Again, if you are using something like metalLB, you don't need this, as your DNS records would be based on your fronting LB, instead of the pods running behind it.
Solutions like MetalLB do handle this, and don't run into the issues with daemonsets that Traefik does. Hopefully this gives some more insight as to why we are extremely hesitant to add hostNetworking to this chart. |
I hear what you're saying about it being discouraged, but it is still an option. The Traefik helm chart could pass on that choice to the end user, and do a helpful thing in applying an anti-affinity if the user opted to use the host network. I can lay out my use case if you like, but I typed it out a few times and the wall of text is 👎 |
I think this would be very useful. NGINX Ingress already has this option. |
yeah, stable/traefik chart also have that option. My use case is external load balancer, which is controlled outside of k8s. So I could create LB with terraform for example, and point it to specific ports, exposed on worked nodes by traefik & hostport. And I don't want to use any nodePorts because of kube-proxy routing requests from nodes, where traefik is not even running to actual pods. So it's 👍 from me! |
Thanks for all your feedback. We have reopend #49 |
Appreciate you all considering this and all the work you do on the project 🙂 |
Opening issue for discussion as requested in #49.
I want to be able to run Traefik in the host network namespace when I deploy it with this chart for the following potential scenarios:
For any or all of these use cases, I need to be able to run my Traefik pod in the host network because:
As noted in the Traefik Team reply here and included in my original PR, this will also require some anti-affinity rules to be added to force Traefik pods to spread out among the nodes.
@mmatur do you have any questions about this?
The text was updated successfully, but these errors were encountered: