NDB Operator Manual  /  Deploying NDB Cluster with NDB Operator  /  Creating an NdbCluster Object

3.2 Creating an NdbCluster Object

To create an NdbCluster object in the Kubernetes Cluster, issue the following command:

> kubectl apply -f docs/examples/example-ndb.yaml
ndbcluster.mysql.oracle.com/example-ndb created

Once this object has been created in the Kubernetes Cluster, the NDB Operator—which watches for changes to any NdbCluster object—detects the action and begins to set up the NDB Cluster inside the Kubernetes Cluster.

NDB Cluster nodes are run inside multiple pods, which can be viewed by issuing the command shown here:

> kubectl get pods -w
NAME                                          READY   STATUS    RESTARTS   AGE
example-ndb-mgmd-0                            1/1     Running   0          8m44s
example-ndb-mgmd-1                            1/1     Running   0          48s
example-ndb-mysqld-599bcfbd45-qzrsr           0/1     Running   0          7s
example-ndb-mysqld-599bcfbd45-r7g2x           0/1     Running   0          7s
example-ndb-ndbd-0                            1/1     Running   0          8m44s
example-ndb-ndbd-1                            1/1     Running   0          8m44s
ndb-operator-555b7b65-2rssd                   1/1     Running   0          48m
ndb-operator-webhook-server-d67c97d54-m5d42   1/1     Running   0          48m

The pods whose names begin with example-ndb- are those running NDB Cluster nodes. The type of node can be seen in each name.

The NDB Cluster is ready for transactions once all pods are ready.