Loading Docker Registry Manually After Garbage Collection

Unable to login Automation Suite 22.10.

Issue Description: Docker Registry Pod is ImagePullBackOff.

Validate by running

  • kubectl -n docker-registry get pods
  • kubectl describe pod shows errors failing to pull docker image

Resolution:

  1. Locate docker registry file in the following directories. File will be something like registry 2_7_1.tar, now perform grep for registry.

  • # cd /var/lib/rancher/rke2/agent/infra-images
  • #cd /var/lib/rancher/rrke2/agent/images
  1. Make sure that registry tar file is in the /images directory.
  2. The following command will load all images using pod man in the current directory.
  • # for image_file in *.tar; do podman load -i "$image_file"; done
  • # kubectl get pods -A | grep docker

  1. If it is still not working, load the image with crictl.
  • export CRI_CONFIG_FILE=/var/lib/rancher/rke2/agent/etc/crictl.yaml
  • ctr --address /run/k3s/containerd/contaerd.sock images import
  • crictl images ls -a | grep reg