I set up an external registry named “docker” with endpoint “docker.com” to let the replicated access my containers in dockerhub. In the K8s YAML I’m referencing my images as “COMPANYNAME/IMAGE”. I always get “Failed to pull image” errors.
You’ll also need to make sure you’ve filled out the images section as described in Docker Registries and added the replicatedregistrykey image pull secret.
When updating the release, I can see the dasbhoard download the images, but the pods will stay in the state ImagePullBackOff. When I look at the journalctl --unit docker, I get something similar like this:
"Handler for GET /v1.24/images/index.docker.io/smaccio/my-image:0.5.0/json returned error: No such image: index.docker.io/smaccio/my-image:0.5.0"
you found in your deployments and other workloads. It will also be re-tagged to Replicated’s on-prem registry.
It seems like for some reason replicated is not re-writing the images section in your deployment. You should be able to use the index.docker.io/smaccio/my-image:0.5.0 without needing to write the registry.replicated.com version yourself.
TIL another reason this could fail is if the apiVersion for Deployment is not apps/v1. Without going too deep into the implementations details, Replicated only rewrites images to the local registry if apps/v1 is used.
In the example below when I used apps/v1beta2 it did not rewrite the image but after I used apps/v1 it rewrote the image fine.