Deploy SingleStore in Google Kubernetes Engine (GKE) Using KubeDB


KubeDB is the Kubernetes Native Database Management Solution which simplifies and automates routine database tasks such as Provisioning, Monitoring, Upgrading, Patching, Scaling, Volume Expansion, Backup, Recovery, Failure detection, and Repair for various popular databases on private and public clouds. The databases supported by KubeDB include MongoDB, Elasticsearch, MySQL, MariaDB, Redis, PostgreSQL, FerretDB, SingleStore, Percona XtraDB, and Memcached. Additionally, KubeDB also supports ProxySQL, PgBouncer, Pgpool, ZooKeeper and the streaming platform Kafka, RabbitMQ. You can find the guides to all the supported databases in KubeDB . In this tutorial we will deploy SingleStore in Google Kubernetes Engine (GKE) Using KubeDB. We will cover the following steps:

  1. Install KubeDB
  2. Deploy SingleStore Cluster
  3. Read/Write Sample Data
  4. Access SingleStore Studio UI

Get Cluster ID

We need the cluster ID to get the KubeDB License. To get cluster ID, we can run the following command:

$ kubectl get ns kube-system -o jsonpath='{.metadata.uid}'

Get License

Go to Appscode License Server to get the license.txt file. For this tutorial we will use KubeDB.

License Server

Install KubeDB

We will use helm to install KubeDB. Please install helm here if it is not already installed. Now, let’s install KubeDB.

$ helm search repo appscode/kubedb
NAME                              	CHART VERSION	APP VERSION	DESCRIPTION                                       
appscode/kubedb                   	v2024.6.4    	v2024.6.4  	KubeDB by AppsCode - Production ready databases...
appscode/kubedb-autoscaler        	v0.31.0      	v0.31.0    	KubeDB Autoscaler by AppsCode - Autoscale KubeD...
appscode/kubedb-catalog           	v2024.6.4    	v2024.6.4  	KubeDB Catalog by AppsCode - Catalog for databa...
appscode/kubedb-community         	v0.24.2      	v0.24.2    	KubeDB Community by AppsCode - Community featur...
appscode/kubedb-crd-manager       	v0.1.0       	v0.1.0     	KubeDB CRD Manager by AppsCode                    
appscode/kubedb-crds              	v2024.6.4    	v2024.6.4  	KubeDB Custom Resource Definitions                
appscode/kubedb-dashboard         	v0.22.0      	v0.22.0    	KubeDB Dashboard by AppsCode                      
appscode/kubedb-enterprise        	v0.11.2      	v0.11.2    	KubeDB Enterprise by AppsCode - Enterprise feat...
appscode/kubedb-grafana-dashboards	v2024.6.4    	v2024.6.4  	A Helm chart for kubedb-grafana-dashboards by A...
appscode/kubedb-kubestash-catalog 	v2024.6.4    	v2024.6.4  	KubeStash Catalog by AppsCode - Catalog of Kube...
appscode/kubedb-metrics           	v2024.6.4    	v2024.6.4  	KubeDB State Metrics                              
appscode/kubedb-one               	v2023.12.28  	v2023.12.28	KubeDB and Stash by AppsCode - Production ready...
appscode/kubedb-ops-manager       	v0.33.0      	v0.33.0    	KubeDB Ops Manager by AppsCode - Enterprise fea...
appscode/kubedb-opscenter         	v2024.6.4    	v2024.6.4  	KubeDB Opscenter by AppsCode                      
appscode/kubedb-provider-aws      	v2024.6.4    	v0.8.0     	A Helm chart for KubeDB AWS Provider for Crossp...
appscode/kubedb-provider-azure    	v2024.6.4    	v0.8.0     	A Helm chart for KubeDB Azure Provider for Cros...
appscode/kubedb-provider-gcp      	v2024.6.4    	v0.8.0     	A Helm chart for KubeDB GCP Provider for Crossp...
appscode/kubedb-provisioner       	v0.46.0      	v0.46.0    	KubeDB Provisioner by AppsCode - Community feat...
appscode/kubedb-schema-manager    	v0.22.0      	v0.22.0    	KubeDB Schema Manager by AppsCode                 
appscode/kubedb-ui                	v2024.6.3    	0.6.8      	A Helm chart for Kubernetes                       
appscode/kubedb-ui-server         	v2021.12.21  	v2021.12.21	A Helm chart for kubedb-ui-server by AppsCode     
appscode/kubedb-webhook-server    	v0.22.0      	v0.22.0    	KubeDB Webhook Server by AppsCode 

$ helm install kubedb oci:// \
  --version v2024.6.4 \
  --namespace kubedb --create-namespace \
  --set-file global.license=/path/to/the/license.txt \
  --set global.featureGates.Singlestore=true \
  --wait --burst-limit=10000 --debug

Let’s verify the installation:

$ kubectl get pods --all-namespaces -l ""
NAMESPACE   NAME                                            READY   STATUS    RESTARTS      AGE
kubedb      kubedb-kubedb-autoscaler-849f7b8d8-26xdx        1/1     Running   0             74s
kubedb      kubedb-kubedb-ops-manager-9f46c95b6-ffd6x       1/1     Running   0             74s
kubedb      kubedb-kubedb-provisioner-7cd66fc98c-cf8mm      1/1     Running   0             74s
kubedb      kubedb-kubedb-webhook-server-78f9bc4c6f-fsgx2   1/1     Running   0             74s
kubedb      kubedb-petset-operator-77b6b9897f-px2l2         1/1     Running   0             74s
kubedb      kubedb-petset-webhook-server-58df6f6488-lhtvl   2/2     Running   0             74s
kubedb      kubedb-sidekick-c898cff4c-w22l8                 1/1     Running   0             74s

We can list the CRD Groups that have been registered by the operator by running the following command:

$ kubectl get crd -l
NAME                                               CREATED AT              2024-06-24T04:24:45Z                   2024-06-24T04:25:38Z                        2024-06-24T04:25:38Z                   2024-06-24T04:24:45Z    2024-06-24T04:25:34Z   2024-06-24T04:25:34Z                         2024-06-24T04:25:34Z            2024-06-24T04:25:34Z           2024-06-24T04:24:45Z                    2024-06-24T04:24:45Z                2024-06-24T04:24:45Z            2024-06-24T04:25:38Z          2024-06-24T04:24:46Z                    2024-06-24T04:25:38Z                                  2024-06-24T04:25:38Z                   2024-06-24T04:24:46Z               2024-06-24T04:25:42Z          2024-06-24T04:25:42Z                 2024-06-24T04:25:42Z                  2024-06-24T04:25:42Z                                2024-06-24T04:25:41Z                 2024-06-24T04:24:46Z               2024-06-24T04:24:46Z               2024-06-24T04:25:46Z          2024-06-24T04:25:46Z                 2024-06-24T04:25:47Z                  2024-06-24T04:25:46Z                                2024-06-24T04:25:46Z                 2024-06-24T04:24:46Z             2024-06-24T04:24:46Z                 2024-06-24T04:25:50Z            2024-06-24T04:25:50Z                   2024-06-24T04:25:51Z                    2024-06-24T04:25:50Z                                  2024-06-24T04:25:50Z                   2024-06-24T04:24:46Z           2024-06-24T04:24:46Z               2024-06-24T04:24:46Z                  2024-06-24T04:24:46Z              2024-06-24T04:25:55Z         2024-06-24T04:25:54Z                2024-06-24T04:25:55Z                              2024-06-24T04:25:54Z                 2024-06-24T04:25:54Z                2024-06-24T04:24:46Z                2024-06-24T04:24:46Z                     2024-06-24T04:25:55Z                2024-06-24T04:24:46Z            2024-06-24T04:25:58Z                                 2024-06-24T04:25:58Z                    2024-06-24T04:25:58Z    2024-06-24T04:25:59Z            2024-06-24T04:25:59Z                          2024-06-24T04:25:59Z                   2024-06-24T04:24:46Z                  2024-06-24T04:25:38Z          2024-06-24T04:24:46Z      2024-06-24T04:26:02Z              2024-06-24T04:26:02Z                            2024-06-24T04:26:02Z             2024-06-24T04:24:46Z                    2024-06-24T04:24:46Z                    2024-06-24T04:25:55Z               2024-06-24T04:24:47Z

Create SingleStore License Secret

First, we need to create a namespace for our SingleStore deployment. Open your terminal and run the following command:

$ kubectl create namespace demo
namespace/demo created

Next, you’ll need a SingleStore license to create the SingleStore database. Ensure that you have acquired a license, then create a secret to store your license information. Run the following command, replacing your-license-here with your actual license key:

$ kubectl create secret generic -n demo license-secret \
    --from-literal=username=license \

With the namespace and license secret created, we can now deploy the SingleStore cluster.

Deploy SingleStore Cluster

Here is the yaml of the SingleStore CR we are going to use:

kind: Singlestore
  name: singlestore-cluster
  namespace: demo
  version: "8.5.7"
      replicas: 2
          - name: singlestore
                memory: "2Gi"
                cpu: "600m"
                memory: "2Gi"
                cpu: "600m"
        storageClassName: "standard"
        - ReadWriteOnce
            storage: 1Gi
      replicas: 3
            - name: singlestore
                  memory: "2Gi"
                  cpu: "600m"
                  memory: "2Gi"
                  cpu: "600m"                      
        storageClassName: "standard"
          - ReadWriteOnce
            storage: 10Gi
    name: license-secret
  storageType: Durable
  deletionPolicy: WipeOut

Let’s save this yaml configuration into singlestore-cluster.yaml Then create the above SingleStore CR,

$ kubectl apply -f singlestore-cluster.yaml created

In this yaml,

  • In this yaml we can see in the spec.version field specifies the version of SingleStore. Here, we are using SingleStore 8.5.7. You can list the KubeDB supported versions of SingleStore by running $ kubectl get singlestoreversions command.
  • spec.topology represents the clustering configuration for SingleStore.
  • spec.topology.aggregator.replicas or spec.topology.leaf.replicas specifies that the number replicas that will be used for aggregator or leaf.
  • spec.storageType specifies the type of storage that will be used for SingleStore database. It can be Durable or Ephemeral.
  • is the name of the StorageClass used to provision PVCs.

Once these are handled correctly and the SingleStore cluster is deployed, you will see that the following objects are created:

$ kubectl get all -n demo
NAME                                   READY   STATUS    RESTARTS   AGE
pod/singlestore-cluster-aggregator-0   2/2     Running   0          4m55s
pod/singlestore-cluster-aggregator-1   2/2     Running   0          2m38s
pod/singlestore-cluster-leaf-0         2/2     Running   0          4m52s
pod/singlestore-cluster-leaf-1         2/2     Running   0          2m40s
pod/singlestore-cluster-leaf-2         2/2     Running   0          2m1s

NAME                               TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)             AGE
service/singlestore-cluster        ClusterIP   <none>        3306/TCP,8081/TCP   4m59s
service/singlestore-cluster-pods   ClusterIP   None            <none>        3306/TCP            4m59s

NAME                                                     TYPE                     VERSION   AGE   8.5.7     74s

Let’s check if the database is ready to use,

$ kubectl get singlestore -n demo singlestore-cluster
NAME                  TYPE                  VERSION   STATUS   AGE
singlestore-cluster   8.5.7     Ready    5m45s

We have successfully deployed SingleStore cluster in GKE. Now we can exec into the container to use the database.

Accessing Database Through CLI

To access the database through CLI, we have to get the credentials to access. KubeDB will create Secret and Service for the database singlestore-cluster that we have deployed. Let’s check them using the following commands,

$ kubectl get secret -n demo
NAME                            TYPE                       DATA   AGE
singlestore-cluster-root-cred   2      8m20s

$ kubectl get service -n demo
NAME                       TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)             AGE
singlestore-cluster        ClusterIP   <none>        3306/TCP,8081/TCP   8m55s
singlestore-cluster-pods   ClusterIP   None            <none>        3306/TCP            8m55s

Now, we are going to use singlestore-cluster-root-cred to get the credentials.

$ kubectl get secrets -n demo singlestore-cluster-root-cred -o jsonpath='{.data.username}' | base64 -d

$ kubectl get secrets -n demo singlestore-cluster-root-cred -o jsonpath='{.data.password}' | base64 -d

Insert Sample Data

In this section, we are going to login into our SingleStore database pod and insert some sample data.

$ kubectl exec -it singlestore-cluster-aggregator-0 -n demo -- bash
Defaulted container "singlestore" out of: singlestore, singlestore-coordinator, singlestore-init (init)
[memsql@singlestore-cluster-aggregator-0 /]$ memsql -uroot -p"JpQuApDXJ3jJ3TwV"

Server version: 5.7.32 SingleStoreDB source distribution (compatible; MySQL Enterprise & MySQL Commercial)

Copyright (c) 2000, 2022, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

singlestore> SHOW DATABASES;
| Database           |
| cluster            |
| information_schema |
| memsql             |
| singlestore_health |
4 rows in set (0.00 sec)

Query OK, 1 row affected (3.35 sec)

singlestore> SHOW DATABASES;
| Database           |
| Music              |
| cluster            |
| information_schema |
| memsql             |
| singlestore_health |
5 rows in set (0.00 sec)

Query OK, 0 rows affected, 1 warning (0.23 sec)

singlestore> INSERT INTO Music.Artist (Name, Song) VALUES ("John Denver", "Take Me Home, Country Roads");
Query OK, 1 row affected (1.10 sec)

singlestore> SELECT * FROM Music.Artist;
| id | Name        | Song                        |
|  1 | John Denver | Take Me Home, Country Roads |
1 row in set (0.11 sec)

singlestore> exit

We’ve successfully inserted some sample data to our database. More information about Deploy & Manage SingleStore on Kubernetes can be found in Kubernetes SingleStore

Accessing SingleStore Studio UI

Now, we will access the SingleStore Studio UI using port forwarding , which will allow you to manage your SingleStore cluster via a web interface. Run the following command in your terminal, you should see output indicating that port forwarding is active:

$ kubectl port-forward -n demo service/singlestore-cluster 8081
Forwarding from -> 8081
Forwarding from [::1]:8081 -> 8081

Now, the SingleStore Studio UI is accessible at localhost:8081. Open your web browser and navigate to localhost:8081. You will see the SingleStore Studio login panel. Choose the Add Existing Cluster option and click the Next button.

Add or Create Cluster

Next, enter your cluster information, then click the Submit button.

Cluster Information

Once you have provided all the valid information, you will gain access to the SingleStore Studio.

SingleStore Studio

Congratulations! You have successfully accessed the SingleStore Studio. This interface provides a convenient way to monitor and administer your SingleStore database.

We have made a in depth tutorial on Effortlessly Deploy and Manage SingleStore on Kubernetes using KubeDB. You can have a look into the video below:


To speak with us, please leave a message on our website .

To receive product announcements, follow us on X .

To watch tutorials of various Production-Grade Kubernetes Tools Subscribe our YouTube channel.

More about SingleStore on Kubernetes

If you have found a bug with KubeDB or want to request for new features, please file an issue .


Get Up and Running Quickly

Deploy, manage, upgrade Kubernetes on any cloud and automate deployment, scaling, and management of containerized applications.