Yandex Cloud
Documentation
PresentationContact UsTry it for free
© 2026 Direct Cursus Technology L.L.C.
Yandex Cloud Stackland
  • What's new
  • Installation
    • All tutorials
    • Installing Stackland on Yandex BareMetal
    • Installing Stackland on Yandex BareMetal via PXE
    • Installing Stackland on Yandex Cloud VMs
    • Setting up external access to a pod in a cluster
    • Verifying signatures for custom images
    • All guides
        • Creating a Trino cluster
        • Updating cluster settings
        • Deleting a cluster
        • Creating a catalog
        • Editing catalog settings
        • Deleting a folder
    • Projects
    • Resource model
    • Scaling a cluster
    • Licensing
  • Access management
  • Pricing policy
  • Diagnostics and troubleshooting

In this article:

  • Using the CLI
  • Using the management console
  1. Step-by-step guides
  2. Databases and analytics
  3. Managed Service for Trino
  4. Creating a catalog

Creating a Managed Service for Trino catalog

Written by
Yandex Cloud
Updated at October 30, 2026
View in Markdown
  • Using the CLI
  • Using the management console

A Trino catalog defines a connection to a data source. Each catalog is described using a TrinoCatalog resource and associated with a specific cluster via the spec.cluster field.

Supported catalog types:

  • PostgreSQL: Connection properties are specified in spec.postgres.
  • ClickHouse®: Connection properties are specified in spec.clickhouse.
  • Apache Iceberg™: Connection to Iceberg REST Catalog in Stackland is set in spec.stacklandRestCatalog.

In the manifest, specify a single section with connector settings. You do not need to add the spec.type property.

Note

When you create a catalog, Managed Service for Trino recreates the cluster. While the new configuration is being applied, the cluster switches to Updating, and active queries get interrupted. For more information, see Updating a cluster.

Using the CLIUsing the CLI

  1. Get the data source ready:

    • For PostgreSQL and ClickHouse®, create a secret with credentials.
    • For Apache Iceberg™, make sure the Iceberg REST Catalog and Object Storage components are enabled. Create the Iceberg REST Catalog catalog in the same namespace as the Trino cluster and wait for its status to change to ready. Grant permissions to the user or service account that will run queries.
  2. Create the TrinoCatalog resource file, e.g., using the touch trinocatalog.yaml command.

  3. Open the file and paste the configuration for the appropriate catalog type:

    PostgreSQL
    Iceberg
    ---
    apiVersion: v1
    kind: Secret
    metadata:
      name: postgres-secret
    stringData:
      username: <username>
      password: <user_password>
    ---
    apiVersion: trino.stackland.yandex.cloud/v1alpha1
    kind: TrinoCatalog
    metadata:
      name: postgresql-test-trino-full
    spec:
      cluster: trino-full
      name: postgresql-test
      postgres:
        url: postgres.example.svc.cluster.local:5432/database
        credentialsSecretRef:
          name: postgres-secret
          usernameKey: username
          passwordKey: password
    

    Settings:

    • spec.cluster: Name of the Trino cluster you want to associate the catalog with.
    • spec.name: Catalog name in Trino (used in SQL queries, such as SELECT * FROM <catalog_name>.schema.table).
    • spec.postgres.url: PostgreSQL server address in host:port/database format.
    • spec.postgres.credentialsSecretRef: Reference to the Secret with credentials, and the names of usernameKey and passwordKey.

    -ClickHouse®

     {% include notitle [YAML-file](../../_includes/yamls/operations/trino/create-catalog-clickhouse-c3e42da7f70e.md) %}
    
     Settings:
    
     * `spec.cluster`: Trino cluster name.
     * `spec.name`: Catalog name in Trino.
     * `spec.clickhouse.url`: ClickHouse® server address in `host:port/database` format.
     * `spec.clickhouse.credentialsSecretRef`: Reference to the Secret with credentials.
    

    Specify the name of the StacklandRestCatalog resource. The connection settings for both the catalog and storage will be populated automatically.

    apiVersion: trino.stackland.yandex.cloud/v1alpha1
    kind: TrinoCatalog
    metadata:
      name: iceberg-test-trino-full
    spec:
      cluster: trino-full
      name: iceberg-test
      stacklandRestCatalog:
        catalogRef: analytics
    

    Settings:

    • spec.cluster: Trino cluster name.
    • spec.name: Catalog name in Trino SQL queries.
    • spec.stacklandRestCatalog.catalogRef: StacklandRestCatalog resource name in the same namespace.
    • spec.stacklandRestCatalog.useExternalEndpoint: Using an external catalog address. The default value is false, i.e., the internal address is used. You may specify true if public access is enabled for the catalog and the status.externalEndpoint field is populated.
    • spec.stacklandRestCatalog.additionalProperties: Additional Iceberg settings, i.e., data format and compression, file size, filter requirements for queries, statistics, storage options, and Iceberg view support. This is an optional setting.

    The following example uses the catalog's external endpoint. For new tables, the default settings are the PARQUET format, ZSTD compression, and target maximum file size of 512MB. Queries to partitioned tables within the reports and events SQL schemas require a filter by partition keys. The storage connection timeout is set to 10s, and the read/write timeout is 30s. Setting iceberg.rest-catalog.view-endpoints-enabled: true enables support for Iceberg views. When creating views, specify SECURITY INVOKER; for more information, see Iceberg views.

    apiVersion: trino.stackland.yandex.cloud/v1alpha1
    kind: TrinoCatalog
    metadata:
      name: iceberg-test-trino-full
    spec:
      cluster: trino-full
      name: iceberg-test
      stacklandRestCatalog:
        catalogRef: analytics
        useExternalEndpoint: true
        additionalProperties:
          iceberg.rest-catalog.view-endpoints-enabled: true
          iceberg.file-format: PARQUET
          iceberg.compression-codec: ZSTD
          iceberg.target-max-file-size: "512MB"
          iceberg.query-partition-filter-required: true
          iceberg.query-partition-filter-required-schemas: "reports,events"
          s3.socket-connect-timeout: "10s"
          s3.socket-timeout: "30s"
    

    Tip

    Make sure the resource name (metadata.name) follows the <spec.name>-<spec.cluster> format as shown above. Otherwise, the operator will reject catalog creation.

  4. Apply the manifest: kubectl apply -f trinocatalog.yaml -n <namespace>.

Using the management consoleUsing the management console

To connect Apache Iceberg™, first, create an Iceberg REST Catalog catalog in the same namespace, wait until it is ready, and assign permission to a user or group.

  1. If you have not opened a project yet, select one.

  2. Select the namespace the cluster was created in.

  3. In the left-hand menu, select Trino → Clusters.

  4. Select the cluster.

  5. Open the Catalogs tab and click Create catalog.

  6. Fill out the fields as follows:

    Basic settings

    • Name: Catalog name in Trino. It is defined in spec.name. The management console automatically uses the <catalog_name>-<cluster_name> format for the Kubernetes resource name (metadata.name).
    • Type: Connector type, i.e., postgresql, clickhouse, or iceberg.

    After selecting the type, the Catalog settings section appears.

    Catalog settings: PostgreSQL

    • URL: Server address in host:port/database format.
    • Username: PostgreSQL user.
    • Password: User password.

    Catalog settings: ClickHouse

    • URL: Server address in host:port/database format.
    • Username: ClickHouse® user.
    • Password: User password.

    Сatalog settings: Iceberg

    • REST Catalog: Iceberg REST Catalog catalog within the current namespace.
    • Access method: Internal or External. The External method is available if the selected catalog has a configured external address.

    Additional settings (optional)

    Specify supported connector settings as key:value pairs. You can add each key only once. For Apache Iceberg™, you can configure settings for data storage, queries, storage access, and Iceberg views.

  7. Click Create.

The new catalog is ready and shown in the Catalogs list. After the operator applies the new configuration and the cluster switches to Running, the catalog will be available in SQL queries.

Was the article helpful?

Previous
Deleting a cluster
Next
Editing catalog settings
© 2026 Direct Cursus Technology L.L.C.