Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
Yandex Managed Service for Kubernetes
  • Comparison with other Yandex Cloud services
  • Getting started
    • All guides
    • Connecting to a node over SSH
    • Connecting to a node via OS Login
    • Updating Kubernetes
    • Configuring autoscaling
      • Getting started with Cloud Marketplace
      • Installing Argo CD
      • Installing Chaos Mesh
      • Installing cert-manager with the Cloud DNS ACME webhook plugin
      • Installing Container Storage Interface for S3
      • Installing Crossplane
      • Installing External Secrets Operator
      • Installing ExternalDNS with a plugin for Cloud DNS
      • Installing Falco
      • Installing Filebeat OSS
      • Installing Fluent Bit
      • Installing Gatekeeper
      • Installing Gateway API
      • Installing the GitLab Agent
      • Installing GitLab Runner
      • Installing HashiCorp Vault
      • Installing Ingress NGINX
      • Installing the Application Load Balancer Ingress controller
      • Upgrading the Application Load Balancer Ingress controller
      • Installing Istio
      • Installing Jaeger
      • Installing Kruise
      • Installing Kyverno & Kyverno Policies
      • Installing Loki
      • Installing Metrics Provider
      • Installing NodeLocal DNS
      • Installing Policy Reporter
      • Installing Prometheus Operator
      • Installing Thumbor
      • Installing Velero
    • Connecting external nodes to the cluster
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Release notes

In this article:

  • Getting started
  • Installation using Yandex Cloud Marketplace
  • Installation using a Helm chart
  • Connecting to Loki
  • See also
  1. Step-by-step guides
  2. Installing apps from Cloud Marketplace
  3. Installing Loki

Installing Loki

Written by
Yandex Cloud
Improved by
Dmitry A.
Updated at May 5, 2025
  • Getting started
  • Installation using Yandex Cloud Marketplace
  • Installation using a Helm chart
  • Connecting to Loki
  • See also

Loki is a horizontally scalable, highly available, multi-tenant log aggregation and storage system. It indexes a set of labels for each log stream rather than the contents of logs.

Getting startedGetting started

  1. If you do not have the Yandex Cloud CLI yet, install and initialize it.

    The folder specified when creating the CLI profile is used by default. To change the default folder, use the yc config set folder-id <folder_ID> command. You can specify a different folder using the --folder-name or --folder-id parameter.

  2. Make sure that the security groups for the Managed Service for Kubernetes cluster and its node groups are configured correctly. If any rule is missing, add it.

    Warning

    The configuration of security groups determines the performance and availability of the cluster and the services and applications running in it.

  3. Prepare for Loki installation:

    1. Create a service account with the storage.uploader and storage.viewer roles. You need it to access Yandex Object Storage.

    2. Create a static access key for your service account in JSON format:

      yc iam access-key create \
        --service-account-name=<service_account_name> \
        --format=json > sa-key.json
      
    3. Create a bucket with restricted access in Object Storage.

Installation using Yandex Cloud MarketplaceInstallation using Yandex Cloud Marketplace

  1. Navigate to the folder dashboard and select Managed Service for Kubernetes.

  2. Click the name of the Managed Service for Kubernetes cluster you need and select the Marketplace tab.

  3. Under Application available for installation, select Loki and click Go to install.

  4. Configure the application:

    • Namespace: Create a new namespace, e.g., loki-space. If you leave the default namespace, Loki may work incorrectly.
    • Application name: Specify the application name.
    • Bucket name: Specify the name of the bucket in Object Storage.
    • Static access key: Paste the contents of the sa-key.json file.
    • Install Promtail: Leave the option enabled to deliver local logs to the Grafana Loki instance using the Promtail agent. This agent is usually used for applications that require regular monitoring.
  5. Click Install.

  6. Wait for the application to change its status to Deployed.

Installation using a Helm chartInstallation using a Helm chart

  1. Install Helm v3.8.0 or higher.

  2. Install kubect and configure it to work with the new cluster.

  3. To install a Helm chart with Loki, run the following command, specifying the parameters of the resources you created earlier:

    helm pull oci://cr.yandex/yc-marketplace/yandex-cloud/grafana/loki/chart/loki \
      --version 1.2.0-7 \
      --untar && \
    helm install \
      --namespace <namespace> \
      --create-namespace \
      --set global.bucketname=<bucket_name> \
      --set-file global.serviceaccountawskeyvalue=<path_to_sa-key.json> \
      loki ./loki/
    

    If you set namespace to the default namespace, Loki may work incorrectly. We recommend you to specify a value different from all existing namespaces (e.g., loki-space).

    Note

    If you are using a Helm version below 3.8.0, append the export HELM_EXPERIMENTAL_OCI=1 && \ string to the command to enable Open Container Initiative (OCI) support in the Helm client.

  4. Make sure all Loki pods have entered the Running state:

    kubectl get pods -A -l "app.kubernetes.io/instance=loki"
    

Connecting to LokiConnecting to Loki

Once deployed, Loki is available within the Managed Service for Kubernetes cluster at the following address:

http://<Loki_gateway_service_name>.<namespace>.svc.cluster.local

To learn the namespace and name of the Loki gateway service, run this command:

kubectl get service -A | grep distributed-gateway

Result:

test-namespace   loki-loki-distributed-gateway   ClusterIP   10.96.168.88   <none>   80/TCP    15m

See alsoSee also

  • Grafana Loki documentation

Was the article helpful?

Previous
Installing Kyverno & Kyverno Policies
Next
Installing Metrics Provider
Yandex project
© 2025 Yandex.Cloud LLC