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.1.2Community Edition
  • Overview
  • Quick start
  • Deploy
  • Upgrade
  • Configure
  • 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
      • 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
      • Restore service from node failure
      • Back up a tenant
      • Restore data from a backup
      • Physical standby tenant
  • Appendix
    • Deploy OceanBase Database and applications in a Kubernetes cluster
    • FAQ
  • Changelog

Download PDF

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

Quick start

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

Prerequisites
Deploy ob-operator
Deploy an OceanBase cluster
What to do next

This topic describes how to deploy ob-operator and an OceanBase cluster and use ob-operator to manage OceanBase Database.

Prerequisites

Before you start the deployment, make sure that the following conditions are met:

  • You have an available Kubernetes cluster, which has at least 2 CPU cores, 10 GB of memory, and 100 GB of storage space.
  • You have installed cert-manager. For more information about how to install cert-manager, see the installation document.
  • You have installed local-path-provisioner and confirmed that the specified destination has sufficient storage space. For more information about how to install local-path-provisioner, see the documentation on GitHub.

Deploy ob-operator

Run the following command to deploy ob-operator in the Kubernetes cluster:

  • Deploy the stable version of ob-operator

    kubectl apply -f https://raw.githubusercontent.com/oceanbase/ob-operator/2.1.0_release/deploy/operator.yaml
    
  • Deploy the developing version of ob-operator

    kubectl apply -f https://raw.githubusercontent.com/oceanbase/ob-operator/master/deploy/operator.yaml
    

Run the following command to verify that ob-operator is deployed:

kubectl get pod -n oceanbase-system

The expected output is as follows:

NAME                                            READY   STATUS    RESTARTS   AGE
oceanbase-controller-manager-86cfc8f7bf-4hfnj   2/2     Running   0          1m

Deploy an OceanBase cluster

Perform the following steps to deploy an OceanBase cluster in the Kubernetes cluster:

  1. Create secrets Before you create an OceanBase cluster, you must create secrets required for specific users. Run the following commands to create secrets:

    kubectl create secret generic root-password --from-literal=password='root_password'
    kubectl create secret generic proxyro-password --from-literal=password='proxyro_password'
    kubectl create secret generic monitor-password --from-literal=password='monitor_password'
    kubectl create secret generic operator-password --from-literal=password='operator_password'
    
  2. Deploy an OceanBase cluster Run the following command to deploy an OceanBase cluster in the Kubernetes cluster:

    kubectl apply -f https://raw.githubusercontent.com/oceanbase/ob-operator/2.1.0_release/example/quickstart/obcluster.yaml
    

    In general, it takes about 2 minutes to create a cluster. Run the following command to check the cluster status:

    kubectl get obclusters.oceanbase.oceanbase.com test
    

    The expected output is as follows:

    NAME   STATUS    AGE
    test   running   6m2s
    
  3. Connect to the OceanBase cluster Perform the following steps to connect to the created OceanBase cluster:

    # Run the following command to obtain the IP address and name of the pod for the server where the OceanBase cluster is deployed.
    # The pod name is in the {cluster_name}-{cluster_id}-{zone}-uuid format.
    kubectl get pods -o wide
    # Run the following command to connect to the cluster.
    mysql -h{POD_IP} -P2881 -uroot -p'root_password' oceanbase -A -c
    

If you have any questions or need help, contact OceanBase Technical Support.

What to do next

This topic describes how to deploy ob-operator and an OceanBase cluster. You can use the method to quickly set up the environment. For more information about the deployment and O&M of clusters in a production environment, see Manage clusters.

After you create a cluster, you need to create a business tenant. For more information about tenant management, see Manage OceanBase Database tenants.

Previous topic

Overview
Last

Next topic

Deploy
Next
on this page
Prerequisites
Deploy ob-operator
Deploy an OceanBase cluster
What to do next