Automation Suite - Troubleshooting - Pod going to ImagePullBackOff in offline environment with message "failed to pull and unpack image: tls: failed to verify certificate"

How to fix pods going to ImagePullBackOff in offline environment with message "failed to pull and unpack image: tls: failed to verify certificate"

Issue Description

Pods are going to ImagePullBackOff in offline environment with the message "failed to pull and unpack image: tls: failed to verify certificate"

ImagePullBackOff.JPG


Root Cause

The certificate is being verified in the registry while pulling the image - disable the certificate verification.

Resolution

  1. Check the status of the pod:
# kubectl get pods -A
  1. For the pod in ImagePullBackOff status, describe the pod:
# kubectl -n  describe pod 

  1. In describe pod, you should see a similar error:

describe pod.JPG

  1. Disable the certificate verification in /etc/rancher/rke2/registries.yaml file by adding the parameter "insecure_skip_verify" to true in tls section:

tls.JPG

  1. In a few minutes, the pod status should change accordingly.