To provide access to the NDB Cluster by applications, NDB Operator creates two load balancer services on top of the pods running NDB Cluster nodes. These services are listed here:
Management server load balancer (
): Provides access to the NDB Cluster management serversndb_cluster_name
-mgmd-extMySQL server (SQL node) load balancer (
): Provides access to the NDB Cluster SQL nodesndb_cluster_name
-mysqld-ext
An application running either inside or outside the Kubernetes cluster can make use of one or both of these services to connect to an NDB Cluster.
Each MySQL server is set up with a root account and a random
password. The password is base-64 encoded and stored in a
Kubernetes secret whose name has the format
.
The password can be retrieved using a command like the one shown
here:
ndb_cluster_name
-mysqld-root-password
> base64 -d <<< \
$(kubectl get secret example-ndb-mysqld-root-password \
-o jsonpath={.data.password})
You can also set a custom password. Create a Kubernetes secret containing the password.
After this, set the name of the secret to the value of the
rootPasswordSecretName
field of the
mysqld
spec (see
Section 5.9, “NdbMysqldSpec Resource”).