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

The perNodeHostBits should be per family #5

Open
uablrek opened this issue Jan 30, 2024 · 7 comments · May be fixed by #9
Open

The perNodeHostBits should be per family #5

uablrek opened this issue Jan 30, 2024 · 7 comments · May be fixed by #9
Assignees
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@uablrek
Copy link
Contributor

uablrek commented Jan 30, 2024

To have just one for both ipv4/ipv6 enforces a limit on the number of PODs on a node only based on the shortcomings of ipv4. It should be possible to define for instance "perNodeHostBits4: 7" and "perNodeHostBits6: 32"

For instance a large cluster may want 1000's of PODs/node, but only gateways/ingress-controllers with IPv4 addresses. They shouldn't be forced to allocate >10 perNodeHostBits for IPv4.

Please see kubernetes/enhancements#2593 (comment)

@mneverov mneverov self-assigned this Feb 2, 2024
@mneverov mneverov linked a pull request Feb 4, 2024 that will close this issue
@aojea
Copy link

aojea commented Feb 5, 2024

@uablrek I don't understand your example,the number of pods should be the same per host in both families, if you have some pods dual stack and others single stack some applications may fail to work.

Relying on previous knowledge of what kind of application you are going to run is not something we can generalize and force users to have a right control of the IP planning, that is precisely what we want to abstract

@uablrek
Copy link
Contributor Author

uablrek commented Feb 5, 2024

CNI plugins can assign IPv4 addresses to just some PODs, e.g. in a namespace. Calico, and my own kube-node IPAM supports it, and probably other CNI-plugins as well.

But to extend the API (CRD) with this proposed feature in a backward compatible way when/if the need arises in the future is not hard.

@aojea
Copy link

aojea commented Feb 7, 2024

but why someone will want to do this? that is my question, one thing is that we can do it, but what problem does it solve?

If you run applications that may have dual or single family without a tight control they may work or not

@uablrek
Copy link
Contributor Author

uablrek commented Feb 7, 2024

They may want to raise maxPods per node from the default of 110, to let's say 1000, without having to waste 11-bit (1024 + 1024 for migration) for unused IPv4 addresses (blog). All problems this feature is solving is there only because of IPv4. I suggest to at least allow a possibility to rid yourself of them. If IPv6 was used you would assign a segment large enough for the lifetime of K8s, and never think about it again.

@aojea
Copy link

aojea commented Feb 7, 2024

but my point is that mixed pods on same node or same cluster does not make sense, or either are all single-stack IPv4 or IPv6 or all dual-stack.
My line of thinking is that is that pods are randomly scheduled, and there are multiple users of the cluster that don't have any idea of how their application will behave regarding the network, so imagine you have a deployment with 3 replicas, and 2 of them are dual stack and other single stack, and for whatever reason need to use IP adddress information.

That is an edge case, but my experience with mixed environments on production is that are always going to fail intermittently with random behaviors, and add a lot of problems to the supports teams, I do not think we should offer an API that allows users to create this complexity

@aojea
Copy link

aojea commented Feb 7, 2024

This is a fact for decades of ipv6 history, mixed ip families workloads does not work well https://en.wikipedia.org/wiki/IPv6_brokenness_and_DNS_whitelisting , if we add mixed families plus single stack, I can not see this can improve, rather most likely will regress

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants