Init a kubernetes cluster with cri-socket /var/run/crio/crio.sock
, when run kubeadm reset
, got these error:
Found multiple CRI sockets, please use --cri-socket to select one: /var/run/dockershim.sock, /var/run/crio/crio.sock
Reason
kubeadm detect known cri sock by finding sock file in fs( https://github.com/kubernetes/kubernetes/blob/8eda21ea3f1c2a95581e8b48b6333d600e7ecda4/cmd/kubeadm/app/util/runtime/runtime.go#L196-L229 ), if you having docker running too, you will get this error.
How to resolve?
Stop docker and delete /var/run/docker.sock
:
rm -rf /var/run/docker.sock