The Okteto Registry allows every Okteto namespace to have its own space to store its container images.
You can use both the
docker client or the okteto CLI to build and push images to the Okteto Registry.
If you are using the
okteto CLI, all you need to do is run
okteto login once. This will download the required tokens and certificates required to push and pull images to the Okteto Registry.
If you are using
docker, you'll need to run the login command:
docker login registry.cloud.okteto.net
username is the email you use with Okteto Cloud, or your Github ID.
password is your Okteto API token. You can retrieve it from here.
Push images into the Okteto Registry
okteto CLI is automatically configured to interact with the Okteto Registry. Just make sure that you are using the registry URL with your Okteto namespace.
okteto build -t registry.cloud.okteto.net/cindy/hello-world:golang .
You can also use any standard tool to build and push container images into the Okteto Registry, like the
docker build -t registry.cloud.okteto.net/cindy/hello-world:golang .docker push registry.cloud.okteto.net/cindy/hello-world:golang
Your image should follow the following scheme, where
<namespace> is a valid Okteto Cloud namespace.
Use images from the Okteto Registry
Any image pushed into the Okteto Registry is private. You'll need to authenticate with the registry before pulling an image.
Namespaces in Okteto Cloud are configured to automatically authenticate and pull images that belong to their namespace. If your application uses images from the Okteto Registry, it'll be able to pull the images without any extra configuration.
To pull an image from a different namespace, you'll need to create and configure the required
imagePullSecrets as outlined in this document.
Access to the Okteto Registry is included with all Okteto Cloud accounts. Developer accounts can store up to 3 images per namespace for free.