NDB Operator Manual  /  NDB Operator CRD Reference  /  NdbMysqldSpec Resource

5.9 NdbMysqldSpec Resource

NdbMysqldSpec is the specification for any MySQL Servers to be run as NDB Cluster SQL nodes. Used by NdbClusterSpec.

  • nodeCount (integer): The number of SQL nodes (that is, MySQL servers or instances of mysqld) running in the NDB Cluster.

  • maxNodeCount (integer): (optional) The NDB Cluster's MySQL servers scale up to this number without forcing a configuration update. If this is unspecified, NDB Operator includes API sections for additional MySQL Servers in the configuration file.

  • connectionPoolSize (integer): (optional) This is the number of connections a single MySQL Server should use to connect to the MySQL Cluster data nodes. See the description of the mysqld --ndb-cluster-connection-pool option for further information.

  • rootPasswordSecretName (string): (optional) The name of the secret that holds the password for the MySQL root accounts. The secret should contain a password key that holds the password. If unspecified, a secret is created by the operator with a generated name in the format ndb_resource_name-mysqld-root-password.

  • rootHost (string): (optional) Names the host or hosts from which the root user can connect to the MySQL server. If unspecified, the root user can connect from any host that can access the MySQL server.

  • myCnf (string): (optional) mysqld configuration options to pass to the SQL nodes when they are started.


    myCnf: |

    The format used for the configuration string is similar to that used in a MySQL my.cnf file. See Option File Syntax, for more information. MySQL Server Options and Variables for NDB Cluster, provides a reference of MySQL Server configuration options specific to NDB Cluster.

  • enableLoadBalancer (bool): (optional) Exposes the MySQL servers externally using the Kubernetes cloud provider's load balancer. By default, the operator creates a ClusterIP type service to expose the MySQL server pods internally within the Kubernetes cluster. If EnableLoadBalancer is set to true, a LoadBalancer service is created instead, exposing the MySQL servers outside the Kubernetes cluster.

  • ndbPodSpec (NdbClusterPodSpec): (optional) A subset of PodSpec fields which, when set, are copied into to the podSpec of the MySQL server's StatefulSet.

  • initScripts (map[string][]string): (optional) A map of configMap names from the same namespace, and, optionally, an array of keys which store the SQL scripts to be executed during MySQL server initialization. If key names are omitted, contents of all the keys are treated as initialization SQL scripts. All scripts are mounted into the MySQL pods and executed by configMap name and key name, in alphabetical order.

  • pvcSpec (Kubernetes core/v1.PersistentVolumeClaimSpec:

    (optional) The PersistentVolumeClaimSpec used as the VolumeClaimTemplate of the MySQL server StatefulSet. A PVC is created for each MySQL server by the StatefulSet controller and loaded into the MySQL server pod and the container.

See also Defining SQL and Other API Nodes in an NDB Cluster.