-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Support for dual-stack Kubernetes cluster #1405
Comments
Continuation of #284 |
I have a bare-minimum approach working locally for allowing dual-stack, but it comes with the following caveats:
The first two caveats can likely be removed with some additional effort (I have this mostly working), which should also pave the way for IPv6-only, however there are some concerning pieces of code in the repo, primarily: and friends, imported from kube-router, which currently has no support for IPv6. It's not clear to me what this code is used for. I've also not yet validated that the k3s loadbalancer, or the traefik ingress function correctly for IPv6 services/endpoints, though I suspect the latter should work fine. |
I would love to deploy k3s with IPV6 in my home (my ISP offers IPV6). |
Unfortunately I've not been able to prioritise finishing this yet - the change is not in a state where I would expect everything to function correctly, and there are some issues with IPv6 all the way up the stack currently. |
@pdf Any chance you can release the patchset or start a PR for this? I'd be interested in furthering this along. |
Dual stack is coming to flannel: flannel-io/flannel#1398 |
This repository uses a bot to automatically label issues which have not had any activity (commit/comment/label) for 180 days. This helps us manage the community issues better. If the issue is still relevant, please add a comment to the issue so the bot can remove the label and we know it is still valid. If it is no longer relevant (or possibly fixed in the latest release), the bot will automatically close the issue in 14 days. Thank you for your contributions. |
IPv6 support for Flannel got merged: flannel-io/flannel#1448 So that blocker is out of the way, I guess now it's on k3s to make something out of it. |
Currently when trying to get kube-dns edited with IPv6 support, and using Calico as CNI it results in errors as the cluster is not configured for dual stack services according to kubectl.
at the top of the edited file which it will not let me commit with that change. |
@samip5 are you using k3s, or a kubeadm-managed cluster? If the latter, I'm not sure you're in the right place. |
I'm using k3s, what made you thought that it would be the latter? |
Well you said
but then edited it before replying, so you clearly knew why I was asking... |
Yes, because to me kubectl and kubeadm were kind of the same thing, which appears to be not true so I wasn't sure which tool made the message in reality when it came up when trying to edit the svc. |
If you want to enable your cluster for DualStack operation, you need to be using K3s 1.21+ and provide your own CNI plugin, node IPv6 addresses, and IPv6 pod/service CIDRs. There is some conversation over at #3212 that you could use as a starting place. |
By default, my cluster got an IPv6 pod cidr even though the k3s server code doesn't seem to provision it but rather kubernetes itself as that's the default. Using k3s version 1.21.3. Default config (with Calico CNI) currently results in something similar to this:
Why is there no documentation for how to properly provision it atm with full stack support? Can I add the IPv6 node addresses after the agent was provisioned to just the systemd args or does it need to be re-installed? |
Because dual stack is beta and not widely used. Moreover k3s defaults to the flannel CNI which does not support dual stack. |
Flannel in fact does support dual stack which was introduced recently. Please see flannel-io/flannel#1448 |
Feel free to open a PR to the docs on how to make it work then! It appears dual stack is only supported using VXLAN on Flannel. |
I believe the CIDRs you're seeing all come from Calico's IPAM. For Flannel, as you said, IPv6 support was only introduced recently. You'll note that there has not been a Flannel release that includes it yet, it's only available on the master branch. We're well aware of the progress on that issue; @manuelbuil is a member of our team and is actively working on end-to-end dual stack support, but it is at the moment a do-it-yourself affair. |
Here is the plan for this:
|
There is also a need for adding dual-stack support in kube-router (and then our fork / copied code). I'm on it. Upstream issue: cloudnativelabs/kube-router#307 |
Kube-router still does not support dual-stack. Until that, network policies need to be disabled when deploying k3s with the default CNI plugin (flannel) |
Validated two ips ipv4 and ipv6 are available within the pod
|
Is your feature request related to a problem? Please describe.
Currently, the parameter inputs (--cluster-cidr, --serice-cidr, etc) do not support more than one entry and that entry must be an IPv4 range. Enabling dual-stack clusters (https://kubernetes.io/docs/concepts/services-networking/dual-stack/) is currently not possible.
Describe the solution you'd like
Enable support for dual-stack kubernetes clusters
Describe alternatives you've considered
N/A
Additional context
Starting k3s with below settings results in a failure on invalid CIDR:
The text was updated successfully, but these errors were encountered: