-
Notifications
You must be signed in to change notification settings - Fork 3.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
Kubeadm unknown service runtime.v1alpha2.RuntimeService #4581
Comments
@blinkiz could you please provide your containerd config.toml and command result of |
Apparently it is my fault this time. My ansible playbook did not override config.toml file as I expected. Am sorry for taking up your time, default installation instructions work great. In the Closing. |
Docker (by default) uses that config for the containerd they install via containerd.io packages. Grr. been causing similar ^ issues for k8s users for years. :-) |
I followed the official instructions here https://kubernetes.io/docs/setup/production-environment/container-runtimes/ and I was getting similar error
I checked /etc/containerd/config.toml and saw 'disabled_plugins = []' Note the only thing I changed in the config.toml was to use systemd as true -it was different from the way docs has mentioned
from docs
deleting this config.toml as given in the first post and restarting containerd service solved and kubeadm could proceed |
This is definitely a bug. For the worker node I followed the docs exact and I was getting this error
till I deleted the config,toml restarted contained and kubelet, after which only the worker joined |
@alexcpn please open new issue to describe the case, thanks. |
This comment saved my day 👍 . The default docker configuration removes CRI. |
Thanks! You help-me with this solution!!! |
Heads up, this just happened to me on a clean install of Kubernetes v1.24.0 on Ubunutu 20.04.4 LTS. The original fix helped me as well. Exception:
Corrected:
|
See link containerd/containerd#4581 (comment) Same fix for older k8s works on latest 1.24.0
I also encountered such a problem, but I didn't solve the problem according to the above operation steps. How should I solve it? |
I have a same issue with kubeadm |
I use ubuntu 20.04 and kubeadm v1.24.0 |
there is no dockershim in kubernetes v1.24 you'll need to install and configure containerd or cri-o |
unfortunately the config in the containerd.io package has, since forever, had a bad configuration for kubernetes tools. The bad configuration is they install a version of the config for containerd that is only good for docker. This config needs to be replaced at least with the default containerd config.. and you can modify it from there if you like. "containerd config default > /etc/containerd/config.toml" will overwrite docker's version of the config and replace it with containerd's version of the config.. which also works just fine for docker. Then restart containerd. |
Thank you very much for your reply. I will try it. |
Hi, I had this same error. "failed to pull images... rpc error ...unknown service... Referring the steps given on top, it solved my problem for K8s 1.24 on RHEL 8.2
Can someone pls help. |
CentOS 7 Case 1:Kubernetes 1.2x binary installation and reports this error solution:
containerd config default > /etc/containerd/config.toml
sed -i 's/SystemdCgroup \= false/SystemdCgroup \= true/' /etc/containerd/config.toml
sed -i 's/snapshotter = "overlayfs"/snapshotter = "native"/' /etc/containerd/config.toml Case 2:kuberspray installs kubernetes 1.25.3 and reports this error solution:
sed -i 's@# containerd_snapshotter: "native"@containerd_snapshotter: "native"@g' inventory/mycluster/group_vars/all/containerd.yml Then rerun kubespray |
Thanks,it's solved my problem |
Thanks,it's solved my problem too |
in my case path of docker installation is wrong and that is causes the same issue . 1 . install docker through k8s guide (command - apt install docker.io does not install latest version of docker and there can |
Got this error too
The following steps worked for me ->
|
I just ran
It seems the Seems like perhaps there should be some enhanced logic in the generate default config that detects if systemd is in use and set those values to EDITUpdate + solution: in my case, I had to set |
not work for me any update pls |
I am also running in the same issue, even after checking the disabled_plugins, and trying all poosible combinations of SystemdCgroup = true/false and systemd_cgroup = true/false :( |
follow Kubernetes latest official regarding containerd also install it via binaries it will be solved |
@hamedsol Thanks for the hint. I was finally able to init the cluster after installing the containerd binaries by following this guide: https://www.itzgeek.com/how-tos/linux/ubuntu-how-tos/install-containerd-on-ubuntu-22-04.html |
Thank you, I solved the problem using your solution! |
I have the same problem when I try to join to master node and my containerd is activate, nothing works |
Follow official documents regarding containerd to enable SystemCgroups on etc/containerd/config.toml if you don't have this file make it by sudo containerd config default | tee etc/containerd/configuration.toml , better to install containerd from binary rather than by package manager |
Got the same issue and fixed it by installing the containerd.io package from the docker repository instead of the one from ubuntu's repository. I have ubuntu 22.04.2 on VMs and raspberry pies Also it seems there is presently an issue to retrieve the gpg key from https://packages.cloud.google.com/apt/doc/apt-key.gpg |
Got the same issue. there is no answer in debian 11. |
I was having same issue on ubutnu 20.04.3, it got fixed after reinstalling docker,containrd, runc etc, then deleting the /etc/container.d/config.toml file. |
I struggled with this too. The solution for me was to comment this line out in
|
Refer to Three pages of Kubernetes Doc:
Steps :
OR can use single shell script for both master-node & worker node configuration script Link - https://github.com/nivaran/Install_k8s_using_shell_script |
…Service. when trying to install the kube mast on a debian image you get " unknown service runtime.v1alpha2.RuntimeService." due to the fact that the installation of 'containerd' from the default debian repository is not updated (for referance - containerd/containerd#4581). To fix it I added the rpository of containrd and installed from their, a documentation of how to do it as a referance can be found here - https://docs.docker.com/engine/install/debian/#uninstall-old-versions.
Hi folks,
|
It got fixed for me finally: fix: Update contained to the latest and fix toml file with below changes: disabled_plugins = ["cri"] -->> disabled_plugins = [""] Done. |
February 2024 fix:
|
This fix works for me! @alanlupsha Would you mind sharing how you came up with this fix? |
I'm glad that works! I used them googles on the interwebs and put all the findings into this. |
Problem
Following Kubernetes official installation instruction for containerd and
kubeadm init
will fail with unknown serviceruntime.v1alpha2.RuntimeService
.Solution:
Versions:
The text was updated successfully, but these errors were encountered: