Managing MemSQL with Kubernetes

Floyd Smith

With the arrival of the cloud, organizations face new opportunities – and new challenges. Chief among them is how to take the greatest advantage of public and private cloud resources without being locked into a specific cloud or being barred from access to existing infrastructure. Container solutions such as Docker offer part of the solution, making it much easier to develop, deploy, and manage software. In our webinar, product manager Micah Bahti describes how to take advantage of the next step: Using Kubernetes, and the beta MemSQL Kubernetes Operator, to manage containers across public clouds and existing infrastructure.

Until recently, however, Kubernetes didn’t manage stateful services. Recently, that support has been added, and MemSQL has stepped into a leading position. Ahead of other widely used database platforms, MemSQL has developed and made available a beta Kubernetes Operator. The Operator was announced at Red Hat Summit early in May. You can easily get the Operator, for either Open Shift or open source Kubernetes.

Note: The MemSQL Kubernetes operator is currently experimental, and in beta. It will reach general availability in the coming months.

You can also use the beta Operator with MemSQL on small deployments, including free instances of MemSQL. It scales smoothly to large databases as well; MemSQL scales to databases in the petabytes.

Deploying and Installing Kubernetes for MemSQL

Deploying and installing Kubernetes for MemSQL is very similar to using Kubernetes with other, stateless software. First, find the needed components. They’re available in the OpenShift container catalog and on Docker Hub.

Listing MemSQL components for Kubernetes

To start deployment, load the image of the MemSQL Kubernetes Operator and the configuration files into your Kubernetes cluster.

First step in installing MemSQL with the Kubernetes Operator

Then, edit the YAML file, memsql-cluster.yaml, to define the attributes of your cluster. The most important is the size of the cluster, in gigabytes. One of the advantages of Kubernetes is that it’s very easy to change this later, quickly and at no cost. For other attributes, the minimum configuration for production should be:

  • 1 leaf unit @ height 1
  • 3 aggregator units @ height 0.5
  • redundancyLevel = 2

Second step in installing MemSQL with the Kubernetes Operator

Note: You can’t downsize a cluster below the amount of data in it. For instance, if you create a 2GB cluster, then put 1.1GB of data in it, telling Kubernetes to downsize the cluster to 1GB will result in an error message.

Finally, create the cluster, and manage it using kubectl. You can connect to the cluster with mysql.

Third step in installing MemSQL with the Kubernetes Operator

You will find support for all this in the MemSQL documentation and the MemSQL Forums. Reach out to us in the Kubernetes forum or by email at team@memsql.com.

Benefits of Using MemSQL with Kubernetes

Because MemSQL offers fast, scalable SQL, the combination of the MemSQL database and the Kubernetes Operator gives you the ability to use a single relational database for transactions and analytics, without the need to move data. MemSQL easily ingests data from a range of sources and supports analytics platforms such as Looker, PowerBI, and Tableau.

When you use MemSQL with Kubernetes, you get complete freedom to deploy or redeploy across physical or cloud infrastructure, as needed. Installation and deployment take minutes, not days or weeks; scaling is elastic; upgrades happen smoothly online. You can upgrade supporting hardware or software, with no effect on your MemSQL cluster.

For more details about the Operator, see our initial announcement. And, if you are not yet a MemSQL user, you can try MemSQL for free today, or contact us to learn how we can help you.

MemSQL Helios eclipse
MemSQL Helios
The World’s Fastest Cloud Database