Skip to main content

Manage parameters

This topic describes how to modify the parameters of an OceanBase cluster by using ob-operator.

Prerequisites

Make sure that the OceanBase cluster is in the Running state.

Procedure

Modify the tag setting in spec

  1. Modify the configuration file of the OceanBase cluster. You need to specify the parameter that you want to modify in spec.parameters. For more information about the complete configuration file, see Create a cluster.

    # Before modification
    # parameters:
    # - name: system_memory
    # value: 2G

    # After modification
    parameters:
    - name: system_memory
    value: 2G
  2. Run the following command for the modification to take effect:

    kubectl apply -f obcluster.yaml
  3. Query the status of custom resources in the OceanBase cluster to check whether the operation succeeds. Run the following command to query the status of the OceanBase cluster.

    kubectl get obclusters.oceanbase.oceanbase.com test -n oceanbase -o yaml

    # desired output, only displays status and one result here
    status:
    parameter:
    - name: system_memory
    server: 10.42.0.232:2882
    value: 2G
    zone: zone1
    status: matched