SingleStore DB

Connect to Your Cluster

The MemSQL Operator creates two services intended for access by 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 memsql-cluster.yaml file has a value of 1, then only the DDL endpoint is created.

If the count field of the aggregatorSpec in the memsql-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. Include -n <namespace> to view these services in a specific namespace.

kubernetes-operator-service-listing.png

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.17

  • 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 MemSQL/SingleStore DB 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 memsql-cluster.yaml definition file.

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

To connect to the MemSQL/SingleStore DB cluster, perform the following steps from a Linux computer that can access the Operator cluster.

  1. Install Studio using the Studio Installation Guide.

  2. Configure Studio to access the DDL endpoint.

    Use the IP address of the svc-memsql-cluster-ddl from the CLUSTER-IP column.

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

    Use the admin database user with the password you defined in the memsql-cluster.yaml definition file.