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

with docker-cri, k8s v1.24.1 uses docker0 as network for pod's #73

Closed
jsachdev07 opened this issue Jun 9, 2022 · 5 comments
Closed

Comments

@jsachdev07
Copy link

Hi,
I have deployed k8s 1.24.1 and used docker-cri for the first time here as dockershim is removed.
The nodes went to ready state after cluster initialization without deploying any cni, earlier with dockershim till 1.23.x I used to deploy calico then only nodes go in ready state.
I noticed that docker0 is used as network for Pod's, all Pod's take an IP from docker0. does cri comes with an inbuilt cni ??
also I found that 2 pod's are taking same IP, let's suppose 2 pod's are running on diff worker nodes, they will take IP from respective node docker0 network, hence same IP's.
Also in such a case how can pod's talk that are running on different worker node ? as each pod takes IP from respective docker0 network
Can we by any chance switch to any other cni like calico or flannel or something else ??

@evol262
Copy link
Contributor

evol262 commented Jun 13, 2022

cri-dockerd is a CRI, and nothing more. You can pick a desired CNI in k8s, and pass --network-plugin=cni to tell cri-dockerd to use it.

@evol262 evol262 closed this as completed Jun 13, 2022
@korncola
Copy link

@evol262
Copy link
Contributor

evol262 commented Jun 14, 2022

@korncola Your comment was in no way helpful.

--network-plugin is an argument to cri-dockerd, not kubelet in this case.

@jsachdev07
Copy link
Author

@evol262 could you please let know how we can set network parameter for cri-dockerd
I was passing --network-plugin during kubeadm init which isn't working in 1.24.1

@evol262
Copy link
Contributor

evol262 commented Jun 15, 2022

Adding --network-plugin=cni to the systemd unit file for cri-dockerd systemd unit file as part of the ExecStart stanza will take care of this.

It's a reasonable default with 1.24 shipped, which will be part of the next release.

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

No branches or pull requests

3 participants