Deployment fails with private container registry and Postgres fails to pull the images
When using third-party registry for container images, the following error message is displayed for some images:
Warning Failed 8m1s (x5 over 10m) kubelet Failed to pull image "reg3rdpartyshan.azurecr.io/netbackup/postgresql-upgrade:16.9.1.0-0003": failed to pull and unpack image "reg3rdpartyshan.azurecr.io/netbackup/postgresql-upgrade:16.9.1.0-0003": failed to resolve reference "reg3rdpartyshan.azurecr.io/netbackup/postgresql-upgrade:16.9.1.0-0003": failed to authorize: failed to fetch anonymous token: unexpected status from GET request to 401: https://reg3rdpartyshan.azurecr.io/oauth2/token?scope=repository%3Anetbackup%2Fpostgresql-upgrade%3Apull&service=reg3rdpartyshan.azurecr.io Unauthorized Warning Failed 8m1s (x5 over 10m) kubelet Error: ErrImagePull
Workaround:
This is a transient error. Delete the pod. After the pod is up and running, ensure that you do not see the same error again.