OceanBase logo

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Resources

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS

OceanBase Cloud

OceanBase Database

Tools

Connectors and Middleware

QUICK START

OceanBase Cloud

OceanBase Database

BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Company

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

International - English
中国站 - 简体中文
日本 - 日本語
Sign In
Start on Cloud

A unified distributed database ready for your transactional, analytical, and AI workloads.

DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS
OceanBase CloudOceanBase Database
ToolsConnectors and Middleware
QUICK START
OceanBase CloudOceanBase Database
BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

Start on Cloud
编组
All Products
    • Databases
    • iconOceanBase Database
    • iconOceanBase Cloud
    • iconOceanBase Tugraph
    • iconInteractive Tutorials
    • iconOceanBase Best Practices
    • Tools
    • iconOceanBase Cloud Platform
    • iconOceanBase Migration Service
    • iconOceanBase Developer Center
    • iconOceanBase Migration Assessment
    • iconOceanBase Admin Tool
    • iconOceanBase Loader and Dumper
    • iconOceanBase Deployer
    • iconKubernetes operator for OceanBase
    • iconOceanBase Diagnostic Tool
    • iconOceanBase Binlog Service
    • Connectors and Middleware
    • iconOceanBase Database Proxy
    • iconEmbedded SQL in C for OceanBase
    • iconOceanBase Call Interface
    • iconOceanBase Connector/C
    • iconOceanBase Connector/J
    • iconOceanBase Connector/ODBC
    • iconOceanBase Connector/NET
icon

Kubernetes operator for OceanBase

V2.3.1Community 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

Overview Quick start Deploy Upgrade Manage clusters Create a cluster Upgrade a cluster Manage parameters Update resources Delete a cluster Manage tenants Create a tenant Delete a tenant Perform tenant O&M operations High availability Recover from node failure Back up a tenant Restore data from a backup Physical standby tenant Inter K8s cluster management Configure Deploy OceanBase Database and web app in a Kubernetes cluster FAQ Changelog
OceanBase logo

The Unified Distributed Database for the AI Era.

Follow Us
Products
OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
Resources
DocsBlogLive DemosTraining & Certification
Company
About OceanBaseTrust CenterLegalPartnerContact Us
Follow Us

© OceanBase 2026. All rights reserved

Cloud Service AgreementPrivacy PolicySecurity
Contact Us
Document Feedback
  1. Documentation Center
  2. Kubernetes operator for OceanBase
  3. V2.3.1
iconKubernetes operator for OceanBase
V 2.3.1Community Edition
Community Edition
  • V 2.3.1
  • V 2.3.0
  • V 2.2.0
  • V 2.1.2
  • V 2.1.1
  • V 2.1.0

FAQ

Last Updated:2025-11-28 06:07:04  Updated
share
What is on this page
1. How do I make sure that a resource is ready?
2. How do I view the O&M status of a resource?
3. How do I do troubleshooting for ob-operator and OceanBase?
4. How do I fix a "stuck" resource in ob-operator?
Reset
Delete
Retry
Skip

folded

share

1. How do I make sure that a resource is ready?

Assume that you want to view the resource status of a cluster. Run the following command:

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

If the status is running in the response, the resource is ready.

# desired output
NAME   STATUS    AGE
test   running   6m2s

2. How do I view the O&M status of a resource?

Assume that you want to view the resource status of a cluster. Run the following command:

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

You can check the status and progress of O&M tasks based on values of parameters in the operationContext section in the response.

status:
  image: oceanbase/oceanbase-cloud-native:4.2.0.0-101000032023091319
  obzones:
  - status: delete observer
    zone: obcluster-1-zone1
  - status: delete observer
    zone: obcluster-1-zone2
  - status: delete observer
    zone: obcluster-1-zone3
  operationContext:
    failureRule:
      failureStatus: running
      failureStrategy: retry over
      retryCount: 0
    idx: 2
    name: modify obzone replica
    targetStatus: running
    task: wait obzone topology match
    taskId: c04aeb28-01e7-4f85-b390-8d855b9f30e3
    taskStatus: running
    tasks:
    - modify obzone replica
    - wait obzone topology match
    - wait obzone running
  parameters: []
  status: modify obzone replica

3. How do I do troubleshooting for ob-operator and OceanBase?

  • Generally, you need to first analyze the logs of ob-operator to locate an error. Run the following command to view the logs of ob-operator:
kubectl logs oceanbase-controller-manager-86cfc8f7bf-js95z -n oceanbase-system -c manager  | less
  • View the logs of the OBServer node
# Log on to the container of the OBServer node.
kubectl exec -it obcluster-1-zone1-8ab645f4d0f9 -n oceanbase -c observer -- bash

# The directory where the log files are located.
cd /home/admin/oceanbase/log

4. How do I fix a "stuck" resource in ob-operator?

Explain

OBResourceRescue is a feature that is only available in ob-operator 2.2.0 and later. You can fix a "stuck" resource through patching the resource with K8s API before 2.2.0. Refer to kubectl patch for more information.

As ob-operator uses a state machine and task flow to manage custom resources (CRs) and their O&M operations, there may be situations where CRs are in an unexpected state. This could include continuously retrying a task flow that is bound to fail, failing to delete a resource, or mistakenly deleting a resource that needs to be recovered. In cases where a CR cannot be restored to normal through regular operations, you can use the OBResourceRescue resource to rescue the problematic CR. The OBResourceRescue resource includes four types of operations: reset, delete, retry, and skip.

A typical OBResourceRescue CR configuration is as follows:

apiVersion: oceanbase.oceanbase.com/v1alpha1
kind: OBResourceRescue
metadata:
  generateName: rescue-reset- # generateName needs to be used with kubectl create -f
spec:
  type: reset
  targetKind: OBCluster
  targetResName: test
  targetStatus: running # The target status needs to be filled in when the type is reset

The key configurations are explained in the following table:

Configuration item Optional values Description
type reset, delete, retry, skip The type of the resource rescue action
targetKind OBCluster, OBZone, OBTenant, and other CRD kind managed by ob-operator The kind of the resource to be rescued
targetResName / The name of the resource to be rescued
targetStatus / This field needs to be filled in when the type is reset, indicating the status of the resource after the reset

Reset

The configuration example of the typical CR above is a reset type of resource rescue. After creating this resource in the K8s cluster using the kubectl create -f command, ob-operator sets the status.status of the resource whose kind is OBCluster and name is test to running (the targetStatus set in the configuration file), and sets the status.operationContext of the resource to empty.

Delete

The configuration example of the delete type of rescue action is as follows. After creating this resource in the cluster, ob-operator clears the finalizers field of the target resource and sets the deletionTimestamp of the resource to the current time.

# ...
spec:
  type: delete
  targetKind: OBCluster
  targetResName: test

Retry

The configuration example of the retry type of rescue action is as follows. After creating this resource in the cluster, ob-operator sets the status.operationContext.retryCount of the target resource to 0 and sets the status.operationContext.taskStatus to pending. Resources in this state will retry the current task.

# ...
spec:
  type: retry
  targetKind: OBCluster
  targetResName: test

Skip

The configuration example of the skip type of rescue action is as follows. After creating this resource in the cluster, ob-operator directly sets the status.operationContext.taskStatus of the target resource to successful. After receiving this message, the task manager will execute the next task in the tasks field.

# ...
spec:
  type: skip
  targetKind: OBCluster
  targetResName: test

Previous topic

Deploy OceanBase Database and web app in a Kubernetes cluster
Last

Next topic

Changelog
Next
What is on this page
1. How do I make sure that a resource is ready?
2. How do I view the O&M status of a resource?
3. How do I do troubleshooting for ob-operator and OceanBase?
4. How do I fix a "stuck" resource in ob-operator?
Reset
Delete
Retry
Skip