Score:0

kubeadm config images pull fails

id flag

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.

Score:2
US flag

this is an issue with the old containerd provided by Ubuntu 20. You can try the following steps (as root):

  1. Set up the Docker repository as described in this documentation
  2. Remove the old containerd: apt remove containerd
  3. Update repository data and install the new containerd: apt update, apt install containerd.io
  4. Remove the installed default config file: rm /etc/containerd/config.toml (if it exist)
  5. Restart containerd: systemctl restart containerd
id flag
Thanks. The most recent containerd provided by Ubuntu also works. I was trying to use a version close to the other machines already in the cluster.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.