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

Update Kubernetes Port Documentation #3368

Merged
merged 1 commit into from May 25, 2018
Merged

Conversation

dtomcej
Copy link
Contributor

@dtomcej dtomcej commented May 22, 2018

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

  • Added/updated documentation

@dtomcej
Copy link
Contributor Author

dtomcej commented May 22, 2018

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.
Copy link
Contributor

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

Copy link
Contributor

@errm errm left a 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 :)

Copy link
Contributor

@nmengin nmengin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👏 📖

Copy link
Contributor

@errm errm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@ldez ldez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants