Connect to Your Cluster

The Operator creates two services for use with clients and database users:

  • One service, svc-memsql-cluster-ddl, is the DDL endpoint. This endpoint is for creating tables.

  • The other service, svc-memsql-cluster-dml, is the DML endpoint. This endpoint is for read/write operations and is load-balanced among the available aggregators.

If the count field of the aggregatorSpec in the sdb-cluster.yaml file has a value of 1, then only the DDL endpoint is created.

If the count field of the aggregatorSpec in the sdb-cluster.yaml file has a value of 2 or greater, the DML endpoint is created as well.

Display the Service Endpoints

Run kubectl get services to display the DDL and DML endpoints.

kubectl get pods
NAME                              READY  STATUS    RESTARTS  AGE
memsql-operator-695d44499c-k4df9  1/1    Running   0         3h33m
node-memsql-cluster-aggregator-0  1/2    Running   0         19s
node-memsql-cluster-leaf-ag1-0    2/2    Running   0         3h30m
node-memsql-cluster-leaf-ag2-0    2/2    Running   0         3h30m
node-memsql-cluster-master-0      2/2    Running   0         3h30m
kubectl get services
NAME                    TYPE          CLUSTER-IP     EXTERNAL-IP  PORT(S)         AGE
kubernetes              ClusterIP     10.96.0.1      <none>       443/TCP         24h
svc-memsql-cluster      ClusterIP     None           <none>       3306/TCP        3h30m
svc-memsql-cluster-ddl  LoadBalancer  10.98.190.175  <pending>    3306:31335/TCP  3h30m
svc-memsql-cluster-dml  LoadBalancer  10.101.157.16  <pending>    3306:30471/TCP  26s

Use these IP addresses from the CLUSTER-IP column to access these services.

  • The DDL port is accessible on the local host on 10.98.190.175

  • The DML port is accessible on the local host on 10.101.157.16

If the Operator cluster resides on a cloud service provider, use the IP addresses from the EXTERNAL-IP column instead, which can be reached externally.

Connect with the MySQL Client

To connect to the SingleStore cluster, run the following command from a computer that can access the Kubernetes cluster. Use the admin database user with the password you defined in the sdb-cluster.yaml definition file.

mysql -u admin -h <hostname> -P <port> -p<password>

Last modified: March 13, 2023

Was this article helpful?