VK Cloud logo
Updated at April 15, 2024   08:50 AM

Docker Registry

Preparatory steps

  1. Create in the object storage bucket, which will be used to store Docker images.

    When creating, select:

    • Storage class: Hotbox.
    • Default ACL: private.

    Write down the bucket's name.

  2. Add a key to access this bucket:

    1. Go to VK Cloud personal account.
    2. Select project.
    3. Go to Object storage → Buckets.
    4. Click on the name of the created bucket.
    5. Go to Keys tab.
    6. Click the Add key button.
    7. Specify any key name.
    8. Leave the other settings unchanged.
    9. Click the Create button.

    Write down the values Access Key ID and Secret Key.

  3. Create an encrypted login/password pair for authorization in the Docker registry by running the command:

    docker run --entrypoint htpasswd registry:2.7.0 -Bbn <login> <password>

    Write down the output of the command (in the format <login>:<encrypted password>).

  4. Add floating IP or find an existing unbound floating IP address.

    Write down this IP address. It will be used to access the Docker registry.

Installing the addon

Several installation options are available for the addon:

  • standard installation;
  • installation on dedicated worker nodes.

Take into account the total maximum system requirements of addons that will be placed on groups of worker nodes. If necessary, perform manual scaling for groups of worker nodes or configure automatic scaling before install.

  1. Install the addon:

    1. Go to VK Cloud personal account.

    2. Select project, where the cluster will be placed.

    3. Go to ContainersKubernetes clusters.

    4. Click on the name of the desired cluster.

    5. Go to Addons tab.

    6. If there are already installed addons in the cluster, click on the Add addon button.

    7. Click the Install addon button on the docker-registry addon card.

    8. Edit if necessary:

      • application name;
      • the name of the namespace where the addon will be installed.
    9. Edit the addon setup code.

    10. Click the Install addon button.

      The installation of the addon in the cluster will begin. This process can take a long time.

  2. Get the data to access the registry.

Editing the addon setup code during installation

Specify:

  1. Details for authorization in the Docker registry:

    secrets:  htpasswd: "<login>:<encrypted password>"
  2. Details for accessing the bucket for storing Docker images:

    secrets:  s3:    secretRef: ""    accessKey: "<Access Key ID>"    secretKey: "<Secret Key>"
    s3:  bucket: <bucket name>
  3. IP address for the load balancer through which access to the service will be provided:

    service:  name: registry  type: LoadBalancer  loadBalancerIP: <selected floating IP address>

After editing the addon code continue installing the addon.

Connecting to registry

  1. Write down the data that was used in the addon setup code when installing it:

    • Login.
    • Password.
    • The IP address of the registry. The Docker registry URL will look like this: <IP address>:5000.
  2. Connect to Docker Registry.