Image PullBackOff Error in pod recreation

We use GitLab CI/CD to build and deploy applications on a Kubernetes Cluster. The gitlab-ci.yaml is an adaptation of GitLab Auto-DevOps. Specially in the deploy stage, we made very few modifications.
We reallized that if the depolyed pod migrates to another host (not that one where it was first deployed), or if that pod is killed, the Image PullBackOff error appers every time when Kubernetes needs to recreate the pod.
To verify if the error occurs every time the pod is killed, we modified the gitlab-ci.yaml, changing the image’s pullPolicy attribute to ‘Always’ in .gitlab/auto-deploy-values.yaml file.

Every time (after the initial deploy) that Kubernetes needs to recreate the pod, the following message is showed:

ImagePullBackOff (Back-off pulling image “”)


ErrImagePull (rpc error: code = Unknown desc = failed to pull and unpack image “”: failed to resolve reference “”: failed to authorize: failed to fetch oauth token: unexpected status: 401 Unauthorized)

If we redeploy de application (redeploy de deployment in kubernetes) the image is download and everything works.

Can someone help me?