OceanBase
English日本語简体中文
Docs Home
Products
Integrations
Release Notes

Databases

OceanBase DatabaseOceanBase Cloud OceanBase Best Practices

Tools

OceanBase Cloud PlatformOceanBase Migration ServiceOceanBase Developer CenterOceanBase Migration AssessmentOceanBase Admin ToolOceanBase Loader and DumperOceanBase DeployerKubernetes operator for OceanBaseOceanBase Diagnostic Tool OceanBase Binlog Service

Connectors and Middleware

OceanBase Database Proxy OceanBase Connector/C OceanBase Connector/J OceanBase Connector/ODBC OceanBase Connector/NETOceanBase Command-Line Client

Databases

OceanBase DatabaseOceanBase Cloud OceanBase Best Practices

Connectors and Middleware

OceanBase Database Proxy OceanBase Connector/C OceanBase Connector/J OceanBase Connector/ODBC OceanBase Connector/NETOceanBase Command-Line Client

Tools

OceanBase Cloud PlatformOceanBase Migration ServiceOceanBase Developer CenterOceanBase Migration AssessmentOceanBase Admin ToolOceanBase Loader and DumperOceanBase DeployerKubernetes operator for OceanBaseOceanBase Diagnostic Tool OceanBase Binlog Service
OceanBase DatabaseOceanBase Cloud ToolsConnectors and MiddlewareLifecycle Support Policy

Kubernetes operator for OceanBase

V2.3.4Community Edition
  • Overview
  • Quick start
  • Deploy
  • Upgrade
  • User guide
    • Cluster management
      • Manage clusters
      • Create a cluster
      • Zone management
        • Add zones to a cluster
        • Delete zones from a cluster
      • Server management
        • Add OBServer nodes to zones
        • Delete OBServer nodes from zones
      • Upgrade a cluster
      • Manage parameters
      • Update resources
      • Delete a cluster
    • Tenant management
      • Manage tenants
      • Create a tenant
      • Modify tenant
        • Manage resources
        • Manage replicas
        • Modify other parameters
      • Delete a tenant
      • Perform tenant O&M operations
    • High availability
      • High availability
      • Recover from node failure
      • Back up a tenant
      • Restore data from a backup
      • Physical standby tenant
      • Inter K8s cluster management
  • Configure
  • Appendix
    • Deploy OceanBase Database and web app in a Kubernetes cluster
    • FAQ
  • Changelog

Download PDF

Document Feedback
  1. Documentation Center
  2. Kubernetes operator for OceanBase
  3. V2.3.4

Update resources

Last Updated:2026-09-04 08:21:43

Scale up: Modify CPU and memory resources
Dynamically expand PVC
Modify the storage class for running cluster

After the cluster is created and running, we may need to adjust the resource configuration of the OBServer node, such as CPU, memory, and storage volumes. This article introduces the resource configuration that can be modified and the specific operations.

Scale up: Modify CPU and memory resources

Note

Only cluster of the standalone or service mode supports this operation.

Assuming that we have created a single-node standalone cluster with a resource specification of 2C+10G. The configuration in YAML format is as follows:

observer:
  # ...
  resource:
    cpu: 2
    memory: 10Gi
  # ...

If you find that the resources are insufficient after running for a period of time and need to be expanded, you can directly modify this part of the configuration. For example, in the following YAML fragment, we have expanded the resource specification of the OBServer to 4C+16G.

observer:
  # ...
  resource:
    cpu: 4
    memory: 16Gi
  # ...

Upon modifying the YAML, apply it to the Kubernetes cluster. ob-operator will then perform the cluster's scale-up expansion. Once the OBCluster transitions back to a running state, the expansion is complete.

kubectl apply -f obcluster.yaml
kubectl get obcluster -w

NAME   STATUS             AGE
test   scale up obzone    xxx
test   scale up obzone    xxx
...
test   running            xxx

Dynamically expand PVC

Note

This operation requires that the storage class used by the cluster supports the AllowVolumeExpansion feature.

Assuming that we have deployed an OBCluster, the storage configuration is shown in the following YAML fragment:

observer:
  # ...
  storage:
    dataStorage:
      storageClass: my-storage
      size: 50Gi
    redoLogStorage:
      storageClass: my-storage
      size: 50Gi
    logStorage:
      storageClass: my-storage
      size: 20Gi
  # ...

To expand the mounted volume, increase the size value in the YAML fragment and apply the changes via kubectl. ob-operator will handle the PVC expansion. Note that size can only be increased.

After modification, the configuration is as follows:

observer:
  # ...
  storage:
    dataStorage:
      storageClass: my-storage
      size: 60Gi
    redoLogStorage:
      storageClass: my-storage
      size: 60Gi
    logStorage:
      storageClass: my-storage
      size: 30Gi
  # ...
kubectl apply -f obcluster.yaml
kubectl get obcluster -w

NAME   STATUS             AGE
test   expand pvc         xxx
test   expand pvc         xxx
...
test   running            xxx

Modify the storage class for running cluster

If you need to change the storage class of the running cluster, you can modify the storage class in the OBCluster YAML configuration and apply the changes via kubectl. ob-operator will handle the migration one server by one server.

Assuming that we have deployed an OBCluster, the storage configuration is shown in the following YAML fragment:

observer:
  # ...
  storage:
    dataStorage:
      storageClass: my-storage
      size: 60Gi
    redoLogStorage:
      storageClass: my-storage
      size: 60Gi
    logStorage:
      storageClass: my-storage
      size: 30Gi
  # ...

To change the storage class, modify the storageClass value in the YAML fragment and apply the changes via kubectl. What value should be modified to depends on the actual situation. In the following example, we change the storage class to new-storage.

After modification, the configuration is as follows:

observer:
  # ...
  storage:
    dataStorage:
      storageClass: new-storage
      size: 60Gi
    redoLogStorage:
      storageClass: new-storage
      size: 60Gi
    logStorage:
      storageClass: new-storage
      size: 30Gi
  # ...

In order to ensure the stability of the cluster, ob-operator will roll out the migration one server by one server. Only after a server is successfully migrated will the next server be migrated. The migration process will not affect the cluster's overall availability, but it may affect the cluster's performance. Therefore, it is recommended to perform this operation during off-peak hours.

Previous topic

Manage parameters
Last

Next topic

Delete a cluster
Next
on this page
Scale up: Modify CPU and memory resources
Dynamically expand PVC
Modify the storage class for running cluster