The process of pulling images from registries in Buildkit doesn’t use Kubernetes’ imagePullSecrets, but rather the credentials available in configuration files like .docker/config.json. When the deployment request is initiated from within the cluster (e.g., through the UI), that file is generated based on the configuration in the link I provided earlier.
I’d like to remind you that credentials saved in the Kubernetes ImagePullSecrets are not utilized within Okteto Builds. For those, you need to have credentials defined locally or utilize the feature Private Registries (renewed since 1.14).
If you’re using any of the above and still facing issues, please provide a redacted version of your Dockerfile and your Okteto manifest (okteto.yaml). I’m particularly interested in the FROM statements. Please also include complete redacted logs.
Thank you for providing your manifests and configuration.
I’ll pose additional questions to better understand your setup:
Which version of Okteto Self Hosted are you running?
Which version of the Okteto CLI are you using?
Could you specify the action or command that triggers the error? I understand it occurs during the build phase, but I’m uncertain if you’re executing it from the web UI, locally with okteto build, or through another okteto command.
Regarding your mention of privateRegistries:
Since version 1.14, the notation displayed in the screenshot is no longer utilized. We have implemented a migration to ensure a smooth transition, but depending on your setup, your configuration might have been missed. The following article contains more information regarding the upgrade process and manual alternatives:
Lastly, if you have already reviewed the documentation provided and are executing okteto build or an equivalent locally, please attempt the following steps:
Execute docker logout (for the default Docker Hub registry) or docker logout <registry> for any other registry.
Retry your Okteto CLI command.
The rationale behind this suggestion is that Okteto prioritizes your local credentials over Okteto Self Hosted Private Registries when the CLI runs locally. Therefore, you may encounter the error due to outdated or expired local credentials.
Thanks for the follow up. We are still on version 1.8 it seems
But I just tried you last suggestion and that worked! I apparently was not logged in, or maybe i was logged in as a different user. I’m a bit surprised that the local docker credentials override the remote ones. Is there a way to disable this?
Currently, there isn’t a way to disable the override of remote credentials by local Docker credentials. I’ll bring up your concern to the product team, and I’ll keep you informed of any developments or updates regarding this matter.