Yandex Cloud
Search
Discuss with expertTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
    • Cloud Interconnect
    • Cloud Backup
    • Cloud Registry
    • Yandex AI Studio
    • Compute Cloud
    • Object Storage
    • Managed Service for Kubernetes®
    • Yandex BareMetal
    • Smart Web Security
    • Security Deck
    • Managed Service for PostgreSQL
    • Managed Service for ClickHouse®
    • Monium
    • Cloud CDN
    • Network Load Balancer
    • Virtual Private Cloud
    • Cloud DNS
    • Application Load Balancer
    • Yandex Cloud Video
    • Stackland
    • Yandex Cloud Router
    • Yandex Managed Service for Trino
    • Managed Service for MySQL®
    • Managed Service for Valkey™
    • Managed Service for Apache Spark™
    • Yandex StoreDoc
    • Managed Service for OpenSearch
    • Managed Service for Apache Kafka®
    • Data Transfer
    • Yandex MPP Analytics Engine for PostgreSQL
    • Yandex Managed Service for Apache Airflow®
    • Data Processing
    • Yandex MetaData Hub
    • Managed Service for YDB
    • Managed Service for Sharded PostgreSQL
    • Managed Service for YTsaurus
    • Yandex WebSQL
    • DataLens
    • Yandex Search API
    • SpeechSense
    • SpeechKit
    • DataSphere
    • Vision OCR
    • Translate
    • Yandex Identity Hub
    • Key Management Service
    • Certificate Manager
    • Yandex Lockbox
    • Audit Trails
    • SmartCaptcha
    • Yandex SIEM
    • SourceCraft Code Assistant
    • Container Registry
    • Managed Service for GitLab
    • Managed Service for Prometheus®
    • Cloud Functions
    • API Gateway
    • Yandex Cloud Postbox
    • Message Queue
    • IoT Core
    • Data Streams
    • Serverless Containers
    • Cloud Notification Service
    • Identity and Access Management
    • Yandex Cloud Console
    • Resource Manager
    • Yandex Cloud Billing
    • Yandex Cloud Quota Manager
    • Cloud Apps
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Yandex Managed Service for YTsaurus
  • Getting started
    • All guides
    • Information about existing clusters
    • Creating a cluster
    • Connecting to a cluster
    • Updating a cluster
    • Stopping and starting a cluster
    • Deleting a cluster
    • Cluster state monitoring
  • Access management
  • Pricing policy
  • Terraform reference
  • Yandex Monitoring metrics
  • Audit Trails events
  • Release notes

In this article:

  • Examples of connection strings
  • Bash
  • Python
  1. Step-by-step guides
  2. Connecting to a cluster

Connecting to a YTsaurus cluster

Written by
Yandex Cloud
View in Markdown
  • Examples of connection strings
    • Bash
    • Python

You can connect to a YTsaurus cluster:

  • From Yandex Cloud VMs.
  • Via the internet over HTTPS.

If your cluster has restrictions on incoming traffic, connect from the internet using an IP address within the allowed ranges. These restrictions do not impact access from Virtual Private Cloud. To change the list of allowed ranges, update the cluster settings.

Examples of connection stringsExamples of connection strings

The examples for Linux were tested in the following environment:

  • Yandex Cloud VM running Ubuntu 20.04 LTS.
  • Bash: 5.0.16.
  • Python: 3.8.2; pip3: 20.0.2.

BashBash

Before connecting:

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

  2. Install the YTsaurus CLI according to the instructions.

  3. Install the dependencies:

    sudo apt update && sudo apt install -y python3 python3-pip && \
    pip3 install ytsaurus-client-yc-auth
    
Connecting from a user VM
Connecting from the internet
  1. Get the access configuration file using the following YC CLI command:

    yc managed-ytsaurus cluster get-configuration <cluster_name_or_ID> --private
    
    Configuration file example
    {
      auth_class = {
        module_name = "yc_managed_ytsaurus_auth";
        class_name = "IamTokenAuth";
      };
      proxy = {
        url = "http://hp.<YTsaurus_cluster_ID>.ytsaurus.mdb.yandexcloud.net:32100";
        network_name = "external";
        http_proxy_role = "default";
      }
    }
    

    The configuration file will be saved to ~/.yt/config.

    You can get the cluster ID with the list of clusters in the folder.

  2. Run a request for the root directory contents list:

    yt list /
    
  1. Get the access configuration file using the following YC CLI command:

    yc managed-ytsaurus cluster get-configuration <cluster_name_or_ID>
    
    Configuration file example
    {
      auth_class = {
        module_name = "yc_managed_ytsaurus_auth";
        class_name = "IamTokenAuth";
      };
      proxy = {
        url = "https://proxy.<YTsaurus_cluster_ID>.ytsaurus.yandexcloud.net";
        enable_proxy_discovery = %false;
      }
    }
    

    The configuration file will be saved to ~/.yt/config.

    You can get the cluster ID with the list of clusters in the folder.

  2. Run a request for the root directory contents list:

    yt list /
    

PythonPython

Before connecting:

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

  2. Install the YTsaurus CLI according to the instructions.

  3. Install the dependencies:

    sudo apt update && sudo apt install -y python3 python3-pip && \
    pip3 install ytsaurus-client-yc-auth
    
Connecting from a user VM
Connecting from the internet
  1. Code example:

    connect.py

    import yt.wrapper as yt
    from yc_managed_ytsaurus_auth import with_iam_token_auth
    
    client = yt.YtClient(
        proxy="http://hp.<YTsaurus_cluster_ID>.ytsaurus.mdb.yandexcloud.net:32100",
        config=with_iam_token_auth(
            config={"proxy": {"network_name": "external", "http_proxy_role": "default"}}
        ),
    )
    
    client.list("/")
    
  2. Connecting:

    python3 connect.py
    
  1. Code example:

    connect.py

    import yt.wrapper as yt
    from yc_managed_ytsaurus_auth import with_iam_token_auth
    
    client = yt.YtClient(
        proxy="https://proxy.<YTsaurus_cluster_ID>.ytsaurus.yandexcloud.net",
        config=with_iam_token_auth(config={"proxy": {"enable_proxy_discovery": False}}),
    )
    
    client.list("/")
    
  2. Connecting:

    python3 connect.py
    

Was the article helpful?

Previous
Creating a cluster
Next
Updating a cluster
© 2026 Direct Cursus Technology L.L.C.