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

# Installation GitLab Runner


[GitLab Runner](https://docs.gitlab.com/runner/) is an open-source application that runs GitLab CI/CD jobs using instructions in a special file named `.gitlab-ci.yml`. It helps run automated builds in a [Managed Service for Kubernetes cluster](../../concepts/index.md#kubernetes-cluster).

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

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 %}

1. Open the GitLab administration panel in your browser:
   * If GitLab is deployed on a [Yandex Compute Cloud](../../../compute/index.md) [VM instance](../../../compute/concepts/vm.md), use its [public IP address](../../../compute/concepts/network.md#public-ip).
   * If GitLab is deployed in [Yandex Managed Service for GitLab](../../../managed-gitlab/index.md), use the [instance FQDN](../../../compute/concepts/network.md##hostname).
1. Get the GitLab Runner authentication token:
   * To configure GitLab Runner for the entire [GitLab instance](../../../managed-gitlab/concepts/index.md#instance) (GitLab admin permissions required):
     1. Click **Admin area** and select **CI/CD** → **Runners**.
     1. Click **New instance runner** and create a new GitLab Runner.
     1. Save the value of the `Runner authentication token` parameter.
   * To configure GitLab Runner for a group or project:
     1. Select a group or project you want to configure.
     1. On the left-hand side of the window that opens, click **Settings** and select **CI/CD**.
     1. Under **Runners**, click **Expand**.
     1. Click **New project runner** and create a new GitLab Runner.
     1. Save the `Runner authentication token` value.

## 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 Managed Service for Kubernetes cluster you need and select the ![image](../../../_assets/console-icons/shopping-cart.svg) **Marketplace** tab.
1. Under **Application available for installation**, select [GitLab Runner](https://yandex.cloud/en/marketplace/products/yc/gitlab-runner) and click **Go to install**.
1. Configure the application:
   * **Namespace**: Create a new [namespace](../../concepts/index.md#namespace), e.g., `gitlab-runner-space`. If you leave the default namespace, GitLab Runner may work incorrectly.
   * **Application name**: Specify the application name.
   * **GitLab** domain name: Enter a domain for your GitLab instance.
   * **Registration token**: Specify the token you [obtained previously](#before-you-begin).
   * **Privileged mode for running docker:dind**: This is an optional setting. Enable it if you want to use `docker:dind` images.

        {% note warning %}

        The privileged mode increases the risk of information security incidents. Check out [this article](https://docs.gitlab.com/runner/executors/kubernetes.html#using-dockerdind) before using it.

        {% endnote %}

    * **List of comma-separated tags**: This is an optional setting. Provide a list of tags to distribute jobs between multiple GitLab Runners.
1. Click **Install**.
1. Wait for the application to change its status to `Deployed`.
1. Go back to the **Runners** page of your GitLab instance, refresh the page, and make sure you see a new GitLab Runner.

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

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

1. [Install kubect](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 GitLab Runner, run this command:

   ```bash
   helm pull oci://cr.yandex/yc-marketplace/yandex-cloud/gitlab-org/gitlab-runner/chart/gitlab-runner \
     --version 0.54.1 \
     --untar && \
   helm install \
     --namespace <namespace> \
     --create-namespace \
     --set gitlabDomain=<VM_public_IP_address_or_GitLab_instance_FQDN> \
     --set runnerRegistrationToken=<previously_obtained_token> \
     gitlab-runner ./gitlab-runner/
   ```

   If you set `namespace` to the default namespace, GitLab Runner may work incorrectly. We recommend specifying a value different from all the existing namespaces, e.g., `gitlab-runner-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 %}

## Use cases {#examples}

* [Continuous deployment of containerized applications using GitLab](../../tutorials/gitlab-containers.md).
* [Scanning Container Registry for vulnerabilities during continuous deployment of applications using GitLab](../../tutorials/cr-scanner-with-k8s-and-gitlab.md).
* [Storing Docker images in Yandex Container Registry](../../../managed-gitlab/tutorials/image-storage.md).

## See also {#see-also}

* [Managed Service for GitLab guides](../../../managed-gitlab/index.md)
* [GitLab guides](https://docs.gitlab.com/)
* [Guides for GitLab CI/CD](https://docs.gitlab.com/ee/ci/)
* [Reference guide on .gitlab-ci.yml](https://docs.gitlab.com/ee/ci/yaml/index.html)