On this page
This generates a
MemsqlCluster object (from the custom resource definition) that spawns the cluster and all associated necessary objects/resources based on the configurations supplied within.
Create a MemsqlCluster definition file to specify the configuration settings for your cluster.
apiVersion: memsql.com/v1alpha1kind: MemsqlClustermetadata:name: sdb-clusterspec:license: license_keyadminHashedPassword: "hashed_password"nodeImage:repository: singlestore/nodetag: node_tagredundancyLevel: 2serviceSpec:objectMetaOverrides:labels:custom: labelannotations:custom: annotationsaggregatorSpec:count: 2height: 0.5storageGB: 256storageClass: standardobjectMetaOverrides:annotations:optional: annotationlabels:optional: labelleafSpec:count: 2height: 0.5storageGB: 1024storageClass: standardobjectMetaOverrides:annotations:optional: annotationlabels:optional: label
You must edit the following placeholders in this file to properly set up your cluster:
license_with your license from the Cloud Portal.
Note that, as of SingleStoreDB 7.
1. 4, license checks are now
cgroup-aware and respect container resource boundaries for containerized deployments.
While this does not change how license checks are performed, nor does it change how capacity is allocated, it does change how the resources allocated to the container are checked.
hashed_with a hashed version of a secure password for the
admindatabase user on the cluster.
adminuser is the default user you can use when logging into your cluster.
The account is created by the Operator during cluster deployment and has an explicit set of grants (defined at the end of this step) to reduce the scope of this user.
The following python script shows how to create a hashed password.
Note that the asterisk (
*) must be included in the final password.from hashlib import sha1print("*" + sha1(sha1('secretpass'.encode('utf-8')).digest()).hexdigest().upper())
tagspecifies the version of
singlestore/nodethat will be deployed in your cluster.
This value aligns with the version number of the SingleStoreDB database engine that is running in the container.
centos-7.contains version 7.
3. 24-39737ee27b 3 of SingleStoreDB.
You can use different versions of the engine by going to the Docker Hub page for
singlestore/nodeand selecting a different tag.
Because of recent updates to the
singlestore/nodecontainer, you should select a tag that is
8. 9-24b9cbd386 Also, running different versions of the SingleStoreDB engine in one cluster is not supported, so you must ensure that each node in your Kubernetes cluster has the same
By default, the
redundancyLevelis set to
2to enable high availability (HA), which is highlyrecommended for production deployments.
To disable high availability, set this value to
Refer to Managing High Availability for more information.
objectMetaOverridessections are optional.
By including these sections, you can override the metadata annotations and labels at either the node or service layer (
countto alter the number of aggregator or leaf nodes in your cluster.
heightvalue specifies the vCPU and RAM size of an aggregator or leaf node where a
1equals 8 vCPU cores and 32 GB of RAM.
The smallest value you can set is
0.(4 vCPU cores, 16 GB of RAM).
storageGBvalue corresponds to the amount of storage each aggregator or leaf should request for their persistent data volume.
storageClassvalue specifies which storage class to use for the PersistedVolume in the Kubernetes cluster.
You should change this value to align with the default (or custom) storage class available to your cluster.
Users may declare an
This is an optional section that allows environment variables to be specified. The currently supported environment variables include:
Once you have finished creating your definition files, you can deploy your cluster.
userSpec section is an optional section in the
sdb-cluster. file that can be used to control
rootServiceUser permissions in the database.
rootServiceUser permissions is only supported in SingleStoreDB v7.
To control these permissions, add the following section to the
sdb-cluster. file as shown below.
usersSpec:rootServiceUser: true// RequireSSL is a flag that toggles `REQUIRE SSL`// for the `admin` user// For accounts that have REQUIRE SSL, the connection// attempt fails if a secure connection cannot be established.adminRequireSsl: true # true to enable, false to disable
SERVICE_ to the SingleStoreDB root user when
true and, when root has this permission, revokes
false or left unspecified.
admin user has the following database permissions:
CREATE TEMPORARY TABLES
To learn more about a configuration option below while remaining on this page, right-click on the configuration option and open it in a separate tab.
Last modified: August 18, 2023