简体   繁体   中英

If docker-ce and containerd are installed on Ubuntu 20.04, what CRI does K8s use?

In the official Kubernetes documentation for installing kubeadm found here , it states that "If both Docker and containerd are detected, Docker takes precedence" and if on my Ubuntu 20.04 host I have installed docker-ce docker-ce-cli containerd.io as suggested by the docker install documentation , does K8s talk directly to the containerd component or does it still use the (soon to be deprecated from in tree K8s) dockershim layer?

And if it is the latter, how do I get K8s to talk to containerd directly whilst having the docker cli toolset still available on the host?

This is a community wiki answer based on the solution from the comments and posted for better visibility. Feel free to expand it.

As already mentioned by @mmking: if you don't specify a runtime than Docker will be chosen. You can use the --cri-socket alongside the kubeadm init if you want to change it manually like described in Initializing your control-plane node docs :

(Optional) Since version 1.14, kubeadm tries to detect the container runtime on Linux by using a list of well known domain socket paths. To use different container runtime or if there are more than one installed on the provisioned node, specify the --cri-socket argument to kubeadm init.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM