Deploy
This topic describes how to deploy ob-operator.
Prerequisites
ob-operator depends on cert-manager. Before you deploy ob-operator, make sure that you have installed cert-manager. For more information about how to install cert-manager, see the installation document.
Use Helm to deploy ob-operator
You can deploy ob-operator by using Helm. For more information about how to install Helm, see the documentation on GitHub. After you install Helm, run the following command to deploy ob-operator:
helm repo add ob-operator https://oceanbase.github.io/ob-operator/
helm install ob-operator ob-operator/ob-operator --namespace=oceanbase-system --create-namespace
The parameters are described as follows:
-
namespace: the namespace for ob-operator. You can specify a custom namespace as needed. We recommend that you use
oceanbase-system
. -
version: the version of ob-operator. We recommend that you use the latest version.
Use configuration files to deploy ob-operator
You can deploy ob-operator by using the configuration file for the stable or developing version of ob-operator as needed.
-
Deploy the stable version of ob-operator
kubectl apply -f https://raw.githubusercontent.com/oceanbase/ob-operator/stable/deploy/operator.yaml
-
Deploy the developing version of ob-operator
kubectl apply -f https://raw.githubusercontent.com/oceanbase/ob-operator/master/deploy/operator.yaml
We recommend that you use the configuration file for the stable version of ob-operator.
View the deployment result
After the deployment is completed, you can run the following command to view the custom resource definitions (CRDs):
kubectl get crds
If the output is similar to the following example, the CRDs are deployed:
NAME CREATED AT
obparameters.oceanbase.oceanbase.com 2023-11-12T08:06:58Z
observers.oceanbase.oceanbase.com 2023-11-12T08:06:58Z
obtenantbackups.oceanbase.oceanbase.com 2023-11-12T08:06:58Z
obtenantrestores.oceanbase.oceanbase.com 2023-11-12T08:06:58Z
obzones.oceanbase.oceanbase.com 2023-11-12T08:06:58Z
obtenants.oceanbase.oceanbase.com 2023-11-12T08:06:58Z
obtenantoperations.oceanbase.oceanbase.com 2023-11-12T08:06:58Z
obclusters.oceanbase.oceanbase.com 2023-11-12T08:06:58Z
obtenantbackuppolicies.oceanbase.oceanbase.com 2023-11-12T08:06:58Z
Run the following command to check whether ob-operator is deployed:
kubectl get pods -n oceanbase-system
The following result is returned. If all the containers are ready and in the running state, ob-operator is deployed.
NAME READY STATUS RESTARTS AGE
oceanbase-controller-manager-86cfc8f7bf-4hfnj 2/2 Running 0 1m