YTsaurus
YTsaurus is a distributed platform for storing and processing big data. Within Stackland, YTsaurus deploys a single shared YTsaurus cluster to the platform. The cluster includes a MapReduce engine, dynamic tables, the YQL query engine, a web UI, and Identity and Access Management integration.
With YTsaurus, you can:
- Deploy and maintain a YTsaurus cluster within Stackland.
- Configure the composition of cluster subcomponents, such as
UI,CHYT,SPYT,Tutorial,Task Proxy, andOdin, as well as node group sizes using a customYTsaurusConfigresource. - Access the cluster via the UI and HTTP proxy exposed through Stackland Ingress.
This article describes the Stackland wrapper. For more information about the YTsaurus architecture, data format, CLI commands, and SDK, see this official YTsaurus page
Component configuration
The component parameters are defined by the YTsaurusConfig resource. The resource works at the cluster level. The resource name must be main. The platform supports only a single instance.
Here is an example of a minimal configuration with the component enabled:
apiVersion: stackland.yandex.cloud/v1alpha1
kind: YTsaurusConfig
metadata:
name: main # Required; the resource name must be `main`
spec:
enabled: true
clusterName: cluster
cluster:
discovery:
instanceCount: 1
resources:
cpu: "100m"
memory: "256Mi"
primaryMasters:
instanceCount: 1
storage:
size: "5Gi"
resources:
cpu: "300m"
memory: "512Mi"
httpProxies:
instanceCount: 1
resources:
cpu: "300m"
memory: "512Mi"
dataNodes:
- name: ssd
instanceCount: 3
storage:
size: "20Gi"
resources:
cpu: "200m"
memory: "512Mi"
execNodes:
- name: default
instanceCount: 1
storage:
size: "10Gi"
resources:
cpu: "3000m"
memory: "3Gi"
schedulers:
instanceCount: 1
resources:
cpu: "200m"
memory: "256Mi"
controllerAgents:
instanceCount: 1
resources:
cpu: "200m"
memory: "256Mi"
bundleController:
enabled: true
queryTrackers:
instanceCount: 1
resources:
cpu: "100m"
memory: "256Mi"
queueAgents:
instanceCount: 1
resources:
cpu: "100m"
memory: "256Mi"
rpcProxies:
instanceCount: 1
resources:
cpu: "100m"
memory: "256Mi"
strawberry:
enabled: true
resources:
cpu: "100m"
memory: "256Mi"
tabletNodes:
- name: default
instanceCount: 1
resources:
cpu: "500m"
memory: "1Gi"
yqlAgents:
instanceCount: 1
resources:
cpu: "200m"
memory: "1Gi"
ui:
enabled: true
ingressEnabled: true
resources:
cpu: "100m"
memory: "256Mi"
Where:
spec.enabled: Enables and disables the component. The default value isfalse.spec.clusterName: YTsaurus cluster name used for connection and displayed in the UI.spec.cluster: Composition and sizes of cluster subcomponents (see below).
All Kubernetes resources for the YTsaurus cluster (pods, PVCs, secrets, and ingresses) are created in the stackland-ytsaurus system namespace.
Cluster composition
The spec.cluster parameter of the YTsaurusConfig resource describes the required subcomponents of the YTsaurus cluster. For each group, you can set the number of pods (instanceCount), compute resources (CPU and memory), and, optionally, storage settings (storageClass and size).
List of subcomponents:
discovery: Discovery service that coordinates cluster components. TheinstanceCountrange is 1–50.primaryMasters: List of cluster’s primary masters that store metadata. Requires thestoragefield. TheinstanceCountrange is 1–50.httpProxies: HTTP proxy for user requests and UI access. TheinstanceCountrange is 1–3.dataNodes[]: Data storage nodes as a list, with at least one group. Requires thestoragefield. Group names may include only lowercase Latin letters, digits, and hyphens. TheinstanceCountrange per group is 3–10.execNodes[]: MapReduce execution nodes as a list that must include a group nameddefault. Requires thestoragefield. Supports theresources.gpufield. TheinstanceCountrange per group is 1–50.schedulers: MapReduce schedulers. TheinstanceCountrange is 1–10.controllerAgents: Operation controller agents. TheinstanceCountrange is 1–10.spec.cluster.bundleController.enabled: Tablet bundle controller. To enable, use theenabledflag.queryTrackers: YQL and CHYT query trackers. TheinstanceCountrange is 1–10.queueAgents: Queue agents. TheinstanceCountrange is 1–10.rpcProxies: RPC proxies for client SDKs. TheinstanceCountrange is 1–3.tabletNodes[]: Dynamic table nodes as an optional list of groups. TheinstanceCountrange per group is 1–50.yqlAgents: YQL agents. TheinstanceCountrange is 1–3.
The minimum and maximum instanceCount values are defined by the validation schema of the YTsaurusConfig resource. If instanceCount is outside the allowed range, the operator rejects the resource when you create or update it.
Extra subcomponents
To enable additional subcomponents, set the enabled flag in the relevant spec.cluster field:
ui: YTsaurus web UI. IfingressEnabled: true, the system creates an Ingress atytsaurus.<system_domain>. Authentication uses Identity and Access Management with OAuth.strawberry: Strawberry controller to manage the lifecycle of CHYT and SPYT clicks.chyt: CHYT, a ClickHouse® engine on top of YTsaurus. Requiresstrawberryto be enabled.spyt: SPYT, an Apache Spark™ on top of YTsaurus. Requiresstrawberryto be enabled.taskProxy: Task Proxy for running external tasks in YTsaurus. TheinstanceCountrange is 1–10.tutorial: Built-in YTsaurus tutorial that creates the//home/tutorialdirectory with examples.odin:Odinmonitoring service that checks the state of key cluster components.cron.clear_tmp: Regular cleanup of temporary data. Theintervalfield supports values in<number>h,<number>m, or<number>s. The default value is15m.
Cluster network access
Enabling the component creates two external endpoints:
ytsaurus.<system_domain>: YTsaurus web UI. It is only available ifspec.cluster.ui.enabled: trueandspec.cluster.ui.ingressEnabled: true.api.ytsaurus.<system_domain>: HTTP proxy for YTsaurus CLI, SDK, and third-party client requests.
Both ingresses are exposed via the stackland-system class with forced HTTPS redirect. The TLS certificate is issued via Certificate Manager.
RPC proxies are available within the Kubernetes cluster; external access via a network load balancer is not supported.
Authentication and secrets
The YTsaurus cluster administrator credentials are stored in the ytadminsec Secret in the stackland-ytsaurus namespace. This Secret is created when you enable the component and includes the following keys:
login: Administrator login,admin.password: Admin password.token: Administrator token for accessing the API via theytCLI and SDKs.
For more information on how to get these values, see Getting an administrator password and token.
The YTsaurus web interface uses Identity and Access Management with OAuth for authentication. OAuth client (stackland.ytsaurus) parameters and the authorization server address (auth.<system_domain>) are configured automatically by the component.
Resources and storage
Default minimum resource allocation for the component:
- CPU: 8 cores.
- RAM: 16 GiB.
- Storage: 100 GiB.
The YTsaurus cluster is I/O-intensive and requires an SSD storage. Use storage.storageClass to define the storage class for primaryMasters, each dataNodes group, and each execNodes group. If the field is not set, the default storage class selected at component installation is used. For more information, see Disk subsystem.
Once created, the subcomponent storage size can only be increased. For more information about updating cluster parameters, see Updating YTsaurus cluster settings.
Monitoring and alerts
The component installs preconfigured dashboards and alerting rules for YTsaurus in the cluster. The dashboards are published in Grafana by the Monitoring component and cover:
- Cluster state and resources (
cluster-resources). - HTTP and RPC proxies.
- Masters: global and local metrics, and accounts.
- Scheduler: operations, pools, and internal metrics.
- Queues and consumers.
- Tablet bundles: CPU, RAM, network, storage, user load.
Alerts available after enabling the component:
cluster-alerts: Key cluster health metrics.odin-alerts:Odinchecks, which are active whenspec.cluster.odin.enabled: true.
Limits
- The platforms supports only one YTsaurus cluster. The
YTsaurusConfigresource name must bemain. - The
dataNodes,execNodes, andtabletNodesgroup names must start with a lowercase Latin letter and can only contain lowercase letters, digits, and hyphens. execNodesmust contain a group nameddefault.- Once created, the node disk size can only be increased. Reducing the size is not supported.
- Disabling the component (
spec.enabled: false) results in deletion of the YTsaurus cluster along with its data. For more information, see Disabling YTsaurus.