PolarDB-X Operation Guide

A PolarDB-X cluster consists of 4 components: metadata service (GMS), compute nodes (CN), storage nodes (DN), and log nodes (CDC). Each part contains one or more compute resources, which are presented in the form of Pods in Kubernetes. With the PolarDB-X Operator, we can customize each part of the cluster, such as creating 100 compute nodes or distributing 100 nodes across two availability zones to ensure high availability, and so on.

Labels

When composing a PolarDB-X cluster, the operator assigns different labels to each component. The table below shows some commonly used labels.

Label Meaning Optional Values Example
polardbx/name Name of the PolarDBXCluster resource to which the resource belongs quick-start
polardbx/role Role of the resource gms,cn,dn,cdc cn

Combining these labels allows for the selection of different resources. For example, listing all Pods under the quick-start cluster:

$ kubectl get pods -l polardbx/name=quick-start
NAME                                            READY   STATUS    RESTARTS       AGE
quick-start-ml92-cdc-default-77979c6699-5dfgg   2/2     Running   0              10m
quick-start-ml92-cn-default-6d5956d4f4-jdzr4    3/3     Running   1 (7m9s ago)   10m
quick-start-ml92-dn-0-single-0                  3/3     Running   0              10m
quick-start-ml92-gms-single-0                   3/3     Running   0              10m

Or listing all CNs:

$ kubectl get pods -l polardbx/name=quick-start,polardbx/role=cn
NAME                                           READY   STATUS    RESTARTS       AGE
quick-start-ml92-cn-default-6d5956d4f4-jdzr4   3/3     Running   1 (9m1s ago)   12m

Deployment - Cluster Topology

For the convenience of local testing, the [Quick Start] demonstrates the pre-defined specifications and topology of the cluster, compressing the overall resources to below 4c8g. 。

If you want to deploy a more suitable mode of usage, you need to customize the topology and specifications of the cluster. The [PolarDBXCluster API] explains in detail the meanings and optional values of the configurable fields in PolarDBXCluster. You can refer to it for configuration. Of course, the configuration options are quite numerous and complex, and here are a few simple examples for reference:

  • Classic cluster -- 16c64g (2 CN + 2 DN)
apiVersion: polardbx.aliyun.com/v1
kind: PolarDBXCluster
metadata:
  name: classic
spec:
  topology:
    nodes:
      cn:
        replicas: 2
        template:
          resources:
            limits:
              cpu: 16
              memory: 64Gi
      dn:
        replicas: 2
        template:
          resources:
            limits:
              cpu: 16
              memory: 64Gi

It is usually recommended not to set requests for resources to allow Kubernetes to give Pods exclusive compute resources. You can refer to the Kubernetes documentation to understand the concept of Pod quality of service. The default configuration of the Operator does not specify resources for each container. If you need to ensure Guaranteed quality of service for Pods, you need to open the feature EnforceQoSGuaranteed. You can refer to [PolarDB-X Installation and Deployment] for configuration.

Subject to the resources allowed in the Kubernetes cluster, you can configure larger specifications and more nodes for the PolarDB-X cluster.

Cluster Lifecycle Management

Refer to [Lifecycle Management] for full lifecycle management of PolarDB-X clusters, including creation, upgrades, scaling, and deletion.

Component Management

Refer to [Component Management] for managing PolarDB-X CN, DN, and CDC components.

Access

Refer to [Connect to PolarDB-X Database] to select the appropriate access method.

Configuration

Refer to [Database Parameter Settings] for setting and modifying configurations.

Monitoring

Refer to [Monitoring] to enable monitoring for PolarDB-X clusters.

Log Collection

Refer to [Log Collection] to enable log collection for PolarDB-X clusters.

results matching ""

    No results matching ""