I am trying to install k8s on a new machine running Ubuntu 20.04 using containerd and kubeadm is failing to load the images:
# kubeadm config images pull --kubernetes-version=1.21.0 --image-repository registry.k8s.io
failed to pull image "registry.k8s.io/kube-apiserver:v1.21.0": output: time="2023-06-14T15:24:34Z" level=fatal msg="validate service connection: CRI v1 image API is not implemented for endpoint "unix:///run/containerd/containerd.sock": rpc error: code = Unimplemented desc = unknown service runtime.v1.ImageService" , error: exit status 1
I checked containerd and it is running.
# systemctl status containerd
● containerd.service - containerd container runtime
Loaded: loaded (/lib/systemd/system/containerd.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2023-06-14 15:21:35 UTC; 9min ago
I don't have /etc/containerd/config.toml so it is using default configuration.
The plugins list is exactly the same as another (much older) working machine:
# ctr plugins list
TYPE ID PLATFORMS STATUS
io.containerd.content.v1 content - ok
io.containerd.snapshotter.v1 aufs linux/amd64 ok
io.containerd.snapshotter.v1 btrfs linux/amd64 skip
io.containerd.snapshotter.v1 devmapper linux/amd64 error
io.containerd.snapshotter.v1 native linux/amd64 ok
io.containerd.snapshotter.v1 overlayfs linux/amd64 ok
io.containerd.snapshotter.v1 zfs linux/amd64 skip
io.containerd.metadata.v1 bolt - ok
io.containerd.differ.v1 walking linux/amd64 ok
io.containerd.gc.v1 scheduler - ok
io.containerd.service.v1 introspection-service - ok
io.containerd.service.v1 containers-service - ok
io.containerd.service.v1 content-service - ok
io.containerd.service.v1 diff-service - ok
io.containerd.service.v1 images-service - ok
io.containerd.service.v1 leases-service - ok
io.containerd.service.v1 namespaces-service - ok
io.containerd.service.v1 snapshots-service - ok
io.containerd.runtime.v1 linux linux/amd64 ok
io.containerd.runtime.v2 task linux/amd64 ok
io.containerd.monitor.v1 cgroups linux/amd64 ok
io.containerd.service.v1 tasks-service - ok
io.containerd.internal.v1 restart - ok
io.containerd.grpc.v1 containers - ok
io.containerd.grpc.v1 content - ok
io.containerd.grpc.v1 diff - ok
io.containerd.grpc.v1 events - ok
io.containerd.grpc.v1 healthcheck - ok
io.containerd.grpc.v1 images - ok
io.containerd.grpc.v1 leases - ok
io.containerd.grpc.v1 namespaces - ok
io.containerd.internal.v1 opt - ok
io.containerd.grpc.v1 snapshots - ok
io.containerd.grpc.v1 tasks - ok
io.containerd.grpc.v1 version - ok
io.containerd.grpc.v1 cri linux/amd64 ok
# dpkg -s kubeadm | grep Version
Version: 1.21.0-00
(kubelet and kubectl are the same)
# dpkg -s containerd | grep Version
Version: 1.5.9-0ubuntu1~20.04.6
The versions match the other machines already in the cluster.
Anyone have any ideas? Thanks.
this is an issue with the old containerd provided by Ubuntu 20. You can try the following steps (as root):
apt remove containerd
apt update, apt install containerd.io
rm /etc/containerd/config.toml
(if it exist)systemctl restart containerd