-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Always use cni unless running with dockershim #14780
Conversation
/ok-to-test |
This comment has been minimized.
This comment has been minimized.
/retest-required |
Thank you for the PR |
it is related, it was hardcoding "not Docker" in the expectations.
|
b054490
to
b4e843c
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
/retest |
b4e843c
to
0600216
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There is a new cri-dockerd 0.3.0 out, with support for Kubernetes 1.26.0. Hopefully it can include the other fixes... ? But I don't think the CNI bugs are related to the CRI upgrade, even if both of them should be done (both are ancient) |
Hmm, at one point I needed some combination of this & the other two PRs I listed to address #14724 -- that specifically lists #14703 more than this one for that issue, but I'd been testing with a local build merging all 3. Perhaps some further changes in cri-dockerd have made that not critical now, as it seems to work out of the box again if I grab the latest releases of minikube & cri-dockerd & crictl. |
How will the changes here impact users like me, who just want to run with the |
The no-op plugin (--network-plugin=) and kubenet has been removed from upstream (retro-actively), so since Kubernetes 1.24 it is now mandatory to use CRI and CNI... But you can still use a simple single-node network if you want to, by using {
"cniVersion": "0.3.1",
"name": "bridge",
"plugins": [
{
"type": "bridge",
"bridge": "bridge",
"addIf": "true",
"isDefaultGateway": true,
"forceAddress": false,
"ipMasq": true,
"hairpinMode": true,
"ipam": {
"type": "host-local",
"subnet": "10.244.0.0/16"
}
},
{
"type": "portmap",
"capabilities": {
"portMappings": true
}
}
]
}
|
Currently I have a functional single node cluster with no CNI at all, using Kubernetes 1.26.0, minikube 1.28.0, cri-dockerd 0.3.0, passing |
If you really want it, it would be possible to make a special case for docker. The default would still be to use CNI (for 1.24+), but to keep the Anyhow, it was supposed to be possible already. Just need to be a little more explicit about it, and possibly we need to add "" as a special case (or something similar to "no-op" perhaps?)
It is likely to break down in the future, but seems to still work for 1.26 |
Previously the code used But now they mean "use the default" (whatever that happens to be), so need explicit strings for the old values. Slightly complicated that dockershim uses Maybe hardcoding the empty string would work better, for that special case. |
My main interest is that the learning curve towards operating a single node driver=none setup, should avoid extra complexity where practical. It has already grown a fair bit recently, (cri-dockerd, crictl, needing to research the requirement to add I recognise driver=none is never going to be the preferred option for "just make it work, as quickly as possible" use-cases, but it really is great for people willing to put in a minor additional setup cost, in exchange for easier educational tinkering. |
The simple days of Docker are gone, upstream has decided to make CRI mandatory (in 1.24) and to make CNI the default (in 1.25, retroactively also for 1.24). And on the latest release day, using Docker was not even possible (for 1.26). So unfortunately people now have to learn both CRI and CNI, before the cluster will even start. It is possible that this will also include CSI in the future, but for now storage remains "optional" for a single-node cluster (and NFS still works...) I fully assume that we will have to change to containerd as the default for 1.27, simple because dockerd isn't tested. The
The "none" driver is used in both learning and testing environments, and it remains an important target. I detailed some of the worst current bugs with it here: The lack of packaging and the lack of documentation makes it more cumbersome, than what it needed to be. With Docker no longer being Open Source (with Desktop, and Machine no longer being developed), it is "gone". So it seems that Kubernetes is now more Linux, in that you can tinker with it yourself or you can use a distribution ? Anyway, this feature (i.e. network-plugin) will remain - while available. For the future of minikube, there is always the Slack channel: #minikube |
0600216
to
baa1f97
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@afbjorklund the only test failing is TestNetworkPlugins/group/false
could u take a look if we fix that we could merge |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Since cri-dockerd 0.25, it now defaults to cni. So when using cri (not dockershim), use cni too.
You can still use other network plugins, with it. Just that cni is now used by default, for 1.24 up.
kvm2 driver with docker runtime
Times for minikube ingress: 27.7s 27.8s 27.8s 27.2s 27.2s Times for minikube start: 51.6s 51.3s 51.8s 54.5s 52.2s docker driver with docker runtime
Times for minikube ingress: 20.9s 20.9s 20.9s 20.9s 20.9s Times for minikube start: 21.4s 23.0s 25.1s 25.2s 21.0s docker driver with containerd runtime
Times for minikube start: 23.9s 22.6s 22.8s 23.5s 23.8s Times for minikube ingress: 30.3s 31.3s 31.3s 31.4s 31.3s |
These are the flake rates of all failed tests.
To see the flake rates of all tests by environment, click here. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: afbjorklund, medyagh, spowelljr The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@afbjorklund could you please advise me how to change the subnet?
|
Since cri-dockerd 0.2.5, it now defaults to cni.
So when using cri (not dockershim), use cni too.
Closes #14760