https://rancher.com/ logo
Title
f

flat-notebook-92639

12/19/2022, 5:35 PM
Hello everyone ! I updated my Kubernetes cluster from version
v1.23.12
to version
v1.24.8
and I am facing an issue with the crictl commands. When I load locally a "big" (around 5GB) container image (
/var/lib/rancher/rke2/bin/ctr --address=/var/run/k3s/containerd/containerd.sock -n <http://k8s.io|k8s.io> images import /tmp/my-image.tar
), I can not remove it with
crictl
without having an error that I did not have with RKE2
v1.23.12
. After some investigation, it seems that crictl
v1.24.0
(https://github.com/rancher/rke2/blob/v1.24.8+rke2r1/Dockerfile#L137) is maybe the source of the problem because I downloaded the version
v1.23.0
and
crictl rmi
command works well. Just below commands and outputs: With crictl
v1.24.0
and RKE2
v1.24.8
$ /var/lib/rancher/rke2/bin/crictl --runtime-endpoint=unix:///run/k3s/containerd/containerd.sock inspecti my-registry:30005/my-project/test/test:1.0.0
{
  "status": {
    "id": "sha256:[...]",
    "repoTags": [
      "my-registry:30005/my-project/test/test:1.0.0"
    ],
    "repoDigests": [],
    "size": "5357042852",
    "uid": null,
    "username": "test",
    "spec": null,
...
}

$ /var/lib/rancher/rke2/bin/crictl --runtime-endpoint=unix:///run/k3s/containerd/containerd.sock rmi my-registry:30005/my-project/test/test:1.0.0
E1219 17:18:29.677479  127034 remote_image.go:266] "RemoveImage from image service failed" err="rpc error: code = Unknown desc = failed to delete image reference \"sha256:[...]\" for \"sha256:[...]\": context deadline exceeded: unknown" image="my-registry:30005/my-project/test/test:1.0.0"
ERRO[0002] error of removing image "my-registry:30005/my-project/test/test:1.0.0": rpc error: code = Unknown desc = failed to delete image reference "sha256:[...]" for "sha256:[...]": context deadline exceeded: unknown 
FATA[0002] unable to remove the image(s)
With crictl
v1.23.0
and RKE2
v1.24.8
:
$ ./crictl --version
crictl version v1.23.0

$ /var/lib/rancher/rke2/bin/crictl --runtime-endpoint=unix:///run/k3s/containerd/containerd.sock inspecti my-registry:30005/my-project/test/test:1.0.0
{
  "status": {
    "id": "sha256:[...]",
    "repoTags": [
      "my-registry:30005/my-project/test/test:1.0.0"
    ],
    "repoDigests": [],
    "size": "5357042852",
    "uid": null,
    "username": "test",
    "spec": null,
...
}

$ ./crictl --runtime-endpoint=unix:///run/k3s/containerd/containerd.sock rmi my-registry:30005/my-project/test/test:1.0.0
Deleted: my-registry:30005/my-project/test/test:1.0.0
Have you heard of a similar issue?
If I remove the container image with the
ctr
command, there is no problem, no matter the version