-1

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?

PJConnol
  • 119
  • 1
  • 9
  • 2
    Uses docker. Note the documentation says "if you don't specify a runtime". You can specify runtime by setting --cri-socket argument on kubeadm init (see [here](https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/#initializing-your-control-plane-node)). – mmking Mar 07 '21 at 03:47
  • 1
    Ah ok thanks, I'm assuming once dockershim is removed in 1.24, it will default to containerd instead of the user explicitly stating containerd in "--cri-socket" – PJConnol Mar 07 '21 at 16:27
  • Does it answer your question? – Wytrzymały Wiktor Mar 08 '21 at 09:57
  • Yes it does, I'm not sure how to mark it as the answer, as it's only a comment – PJConnol Mar 08 '21 at 10:33
  • Deprecation means scary things to some people. In this case it means k8s maintainers announce in 1.20 that they will eventually at a later point stop maintaining something that Mirantis has already announced they will take over maintaining. The deprecation announcement doesn't mean removed from k8s maintenance yet. https://www.mirantis.com/blog/mirantis-to-take-over-support-of-kubernetes-dockershim-2/ – BMitch Mar 08 '21 at 13:31
  • Fair comment, I will change to "soon to be deprecated from in tree K8's", would that suit better? – PJConnol Mar 09 '21 at 09:10

1 Answers1

1

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.

Wytrzymały Wiktor
  • 11,492
  • 5
  • 29
  • 37