Skip to main content

Okteto Registry

The Okteto Registry allows every Okteto namespace to have its own space to store its container images.

Authentication#

You can use both the docker client or the okteto CLI to build and push images to the Okteto Registry.

If you're using the okteto CLI, all you need to do is run okteto login once. This command will download the required tokens and certificates required to push and pull images to the Okteto Registry.

If you're using docker, you'll need to run the login command:

docker login registry.cloud.okteto.net

The username is the email you use with Okteto Cloud or your Github Username. The password is your Okteto API token. You can retrieve it from here.

Push images into the Okteto Registry#

The okteto CLI is automatically configured to interact with the Okteto Registry. Just make sure that you're using the registry URL with your Okteto namespace.

okteto build -t registry.cloud.okteto.net/cindy/hello-world:golang .

When using the okteto CLI, you can use the notation okteto.dev to refer to images in your namespace. For example, okteto.dev/hello-world:golang expands to registry.cloud.okteto.net/cindy/hello-world:golang for the user cindy and expands to registry.cloud.okteto.net/tom/hello-world:golang for the user tom.

You can also use any standard tool to build and push container images into the Okteto Registry, like the docker client.

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.

registry.cloud.okteto.net/<namespace>/<image>:<tag>

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 automatically allowed to pull images that belong to their namespace automatically. If your application uses images from the Okteto Registry, it'll be able to pull container 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 here.