-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Update Kubernetes Port Documentation #3368
Conversation
ping @containous/kubernetes |
- DaemonSets automatically scale to new nodes, when the nodes join the cluster, whereas Deployment pods are only scheduled on new nodes if required. | ||
- DaemonSets ensure that only one replica of pods run on any single node. Deployments require affinity settings if you want to ensure that two pods don't end up on the same node. | ||
- DaemonSets can be run with the `NET_BIND_SERVICE` capability, which will allow it to bind to port 80/443/etc on each host. This will allow bypassing the kube-proxy, and reduce traffic hops. Note that this is against the Kubernetes Best Practices [Guidelines](https://kubernetes.io/docs/concepts/configuration/overview/#services), and raises the potential for scheduling/scaling issues. Despite potential issues, this remains the choice for most ingress controllers. | ||
- If you are unsure which to choose, start with the Daemonset. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to run more than one Ingress config it is much more convenient to use a Deployment...
e.g. I have run setups with one controller for admin/intranet services and another for external traffic ...
You could run multiple demon sets with all different ports configured but it gets messy quickly...
Also we should mention that running as DeamonSet is the best for bare metal or any other environment where there is no supported load balancer ...
Also we should point out here that DaemonSets don't have to run on all nodes they can be targeted to a labeled subset if required https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/#running-pods-on-only-some-nodes
One strategy can be to have a dedicated pool of ingress enabled nodes that are registered (perhaps manually) with an upstream L3 LB
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM...
I have further thoughts ... but perhaps I should just open more PRs of my own :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👏 📖
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What does this PR do?
Updates the documentation for kubernetes, in particular the port examples, and adds some notes about best practices
Motivation
Fixes #3348
More