How can I connect to my SingleStoreDB cluster deployed on Kubernetes?
The assumption is that all of your SingleStoreDB operator, aggregator, and leaf pods are up, running, and healthy (which can be confirmed with
kubectl get pods). In Kubernetes, nodes, pods, and services all have their own IPs. In many cases, the node IPs, pod IPs, and some service IPs on a cluster will not be routable, so they will not be reachable from outside the Kubernetes cluster.
To connect to a SinglestoreDB cluster you'll need to reach either the DDL or DML service endpoints, these endpoints are created automatically during cluster creation. You'll find service endpoints with
kubectl get svc. In Kubernetes, you have a few options for exposing those services to make a service reachable outside the cluster with an external IP. You can use the service with the type
LoadBalancer(in tandem with an external load balancer usually provided by the cloud vendor or using a more manual one like MetalLB).
More on Services in Kubernetes from the Kubernetes documentation here.
After configuring your DDL (or DML) service endpoint with an externally accessible IP, you should be able to connect to your SingleStoreDB cluster as with any other deployment:
mysql -h [dml or ddl endpoint] -u admin -p
singlestore -h [dml or ddl endpoint] -u admin -p
You will need to provide the password that was included (and hashed) in the CR manifest (sdb-cluster.yaml/memsql-cluster.yaml).
More on SingleStoreDB & Kubernetes can be found here:
Note: This article is intended for readers that are familiar with using Kubernetes and understand the purpose of an operator