[Yandex Cloud documentation](../../../index.md) > [Yandex Managed Service for Kubernetes](../../index.md) > [Step-by-step guides](../index.md) > Installing applications from Cloud Marketplace > Installing Thumbor

# Installing Thumbor


[Thumbor](https://thumbor.readthedocs.io/en/latest/) is an [open-source](https://github.com/thumbor/thumbor) project for on-demand image processing. Thumbor runs as an HTTP service and performs transformations, such as image cropping and resizing, [applying filters](https://thumbor.readthedocs.io/en/latest/filters.html#available-filters) and [many others](https://thumbor.readthedocs.io/en/latest/imaging.html).

Thumbor features:
* Support for all popular image formats.
* Smart cropping and resizing.
* Accelerated image processing using caching.
* Supporting various storage types (local disks, Yandex Object Storage, and others).
* Face and object recognition (glasses, facial features) based on [computer vision technology](https://github.com/opencv/opencv).
* Integration with various programming languages.

## Getting started {#before-you-begin}

1. [Create a bucket](../../../storage/operations/buckets/create.md) with restricted access in Object Storage.
1. [Upload images to the bucket](../../../storage/operations/objects/upload.md#simple).
1. [Create a service account](../../../iam/operations/sa/create.md) for Thumbor.
1. Create a [static key](../../../iam/operations/authentication/manage-access-keys.md#create-access-key) and save it to a file named `sa-key.json`:

   ```bash
   yc iam access-key create \
     --service-account-name <service_account_name_for_Thumbor> \
     --format json > sa-key.json
   ```

1. [Set the bucket object read access permissions](../../../storage/operations/objects/edit-acl.md) for the service account.

1. [Make sure](../connect/security-groups.md) the security groups for the Managed Service for Kubernetes cluster and its node groups are configured correctly. If a rule is missing, [add it](../../../vpc/operations/security-group-add-rule.md).

    {% note warning %}
    
    The configuration of security groups determines performance and availability of the cluster and the services and applications running in it.
    
    {% endnote %}

## Installation from Yandex Cloud Marketplace {#marketplace-install}

1. In the [management console](https://console.yandex.cloud), select a folder.
1. Navigate to **Managed Service for&nbsp;Kubernetes**.
1. Click the name of the Kubernetes cluster you need and select the ![image](../../../_assets/console-icons/shopping-cart.svg) **Marketplace** tab.
1. Under **Application available for installation**, select [Thumbor](https://yandex.cloud/en/marketplace/products/yc/thumbor) and click **Go to install**.
1. Configure the application:
   * **Namespace**: Create a new [namespace](../../concepts/index.md#namespace), e.g., `thumbor-space`. If you leave the default namespace, Thumbor may work incorrectly.
   * **Application name**: Specify the application name.
   * **Bucket name**: Specify the [name of the bucket](#before-you-begin) you created previously.
   * **Object Storage static access key**: Paste the contents of the `sa-key.json` file.
   * **Security key**: Specify the security key for URL signing. This is an optional setting.
   * **Allow unsigned URLs (unsafe)**: Select this option if you did not specify a security key at the previous step.
   * **Subfolder in the bucket**: Specify the name of the bucket folder (without the ending `/` character) where images are located.
   * **Public IP address**: Enable this optional setting if you need to assign a public IP address to the service. For Thumbor to run, a Kubernetes service of the `LoadBalancer` type and the appropriate [Yandex Network Load Balancer](../../../network-load-balancer/index.md) load balancer will be created automatically.
1. Click **Install**.
1. Wait for the application status to change to `Deployed`.

## Installation using a Helm chart {#helm-install}

1. [Install Helm](https://helm.sh/docs/intro/install/) v3.8.0 or higher.

1. [Install kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl) and [configure it to work with the new cluster](../connect/index.md#kubectl-connect).

1. To install a [Helm chart](https://helm.sh/docs/topics/charts/) with Thumbor, run the following command, specifying the parameters of the resources you created [earlier](#before-you-begin):

   {% list tabs %}

   - Unsigned URLs are allowed

     ```bash
     helm pull oci://cr.yandex/yc-marketplace/yandex-cloud/thumbor/thumbor/chart/thumbor \
       --version 0.1.2-10 \
       --untar && \
     helm install \
       --namespace <namespace_for_Thumbor> \
       --create-namespace \
       --set bucket_name='<bucket_name>' \
       --set allow_unsafe_url='true' \
       --set root_path='<bucket_subfolder_name>' \
       --set-file saAccessKeyFile='sa-key.json' \
       --set public_address='true' \
      thumbor ./thumbor
     ```

     If you set `namespace` to the default namespace, Thumbor may work incorrectly. We recommend specifying a value different from all the existing namespaces, e.g., `thumbor-space`.

     {% note info %}
     
     If you are using a Helm version below 3.8.0, add the `export HELM_EXPERIMENTAL_OCI=1 && \` string at the beginning of the command to enable [Open Container Initiative](https://opencontainers.org/) (OCI) support in the Helm client.
     
     {% endnote %}

   - Unsigned URLs are not allowed

     ```bash
     helm pull oci://cr.yandex/yc-marketplace/yandex-cloud/thumbor/thumbor/chart/thumbor \
       --version 0.1.2-10 \
       --untar && \
     helm install \
       --namespace <namespace_for_Thumbor> \
       --create-namespace \
       --set bucket_name='<bucket_name>' \
       --set allow_unsafe_url='false' \
       --set security_key='<security_key_for_URL_signing>' \
       --set root_path='<bucket_subfolder_name>' \
       --set-file saAccessKeyFile='sa-key.json' \
       --set public_address='true' \
      thumbor ./thumbor/
     ```

     If you set `namespace` to the default namespace, Thumbor may work incorrectly. We recommend specifying a value different from all the existing namespaces, e.g., `thumbor-space`.

     {% note info %}
     
     If you are using a Helm version below 3.8.0, add the `export HELM_EXPERIMENTAL_OCI=1 && \` string at the beginning of the command to enable [Open Container Initiative](https://opencontainers.org/) (OCI) support in the Helm client.
     
     {% endnote %}

   {% endlist %}

    If `public_address` is set to `true`, a Kubernetes service of the `LoadBalancer` type and a corresponding [Network Load Balancer](../../../network-load-balancer/index.md) will be created automatically to ensure Thumbor runs correctly.

## Accessing the application {#app-access}

{% list tabs group=instructions %}

- Management console {#console}

  1. In the [management console](https://console.yandex.cloud), select a folder.
  1. Navigate to **Network Load Balancer**.
  1. Get the IP address of the load balancer with the following description: `cluster <your_cluster_name>, service <namespace>/thumbor`.
  1. In the browser address bar, open `http://<load_balancer_IP_address>/unsafe/<image_name_in_bucket>`.

- CLI {#cli}

  1. Run the command below to get the load balancer IP address:

     ```bash
     kubectl get svc \
       --namespace <namespace> \
       --output jsonpath='{.status.loadBalancer.ingress[0].ip}' thumbor
     ```

  1. In the browser address bar, open `http://<load_balancer_IP_address>/unsafe/<image_name_in_bucket>`.

{% endlist %}

{% note info %}

If you cannot access the resource at the specified URL, [make sure](../connect/security-groups.md) the security groups for the Managed Service for Kubernetes cluster and its node groups are configured correctly. If a rule is missing, [add it](../../../vpc/operations/security-group-add-rule.md).

{% endnote %}

Learn more about working with images in [this Thumbor guide](https://thumbor.readthedocs.io/en/latest/imaging.html).

## What's next {#what-is-next}

Learn how to use Thumbor for editing images on your website. The [Thumbor use case](../../tutorials/marketplace/thumbor.md) described in our guide involves configuring [Yandex Cloud CDN](../../../cdn/concepts/index.md). Yandex Cloud CDN helps with faster loading of website images.

## Useful links {#see-also}

* [Thumbor documentation](https://thumbor.readthedocs.io/en/latest/)
* [Object Storage guides](../../../storage/index.md)
* [Network Load Balancer guides](../../../network-load-balancer/index.md)