In this tutorial, you will deploy a MemSQL cluster in a Kubernetes environment using a Kubernetes operator. This operator allows you to easily resize clusters, replace failing nodes, and upgrade to newer versions of MemSQL seamlessly. And like other Kubernetes operators, you can use it to deploy clusters easily in many different environments and platforms, both on-premises and in the cloud.
The MemSQL Operator is also certified to run on the various Red Hat OpenShift platforms, so it will work natively with the OpenShift UI portal and other OpenShift management tools. It can also be downloaded directly from Docker Hub when referenced in the MemSQL Operator deployment file.
A four-node cluster is the minimal recommended cluster size for showcasing MemSQL as a distributed, highly-available database; however, you can use the procedures in this tutorial to scale out to additional nodes for increased performance over large data sets or to handle higher concurrency loads. Refer to Distributed Architecture to learn more about MemSQL’s design principles and topology concepts.
There are no licensing costs for using up to four license units for the leaf nodes in your cluster. If you need a larger cluster with more/larger leaf nodes, please create an Enterprise License trial key.
This tutorial assumes you have a basic knowledge of containers and Kubernetes concepts such as Objects, Pods, PersistentVolumes, and so on. In addition, some of the use cases for operators are mentioned in this tutorial, but you should read the CoreOS documentation for a more in-depth explanation of what they are and why they are useful.
Follow these instructions to install
kubectl on the host used to control and manage your cluster.
Cluster deployments must be on hosts that satisfy MemSQL’s hardware and software requirements. Specifically, the following requirements must be met on all hosts:
- Physical or virtual machines with the following:
- At least four CPU cores and eight GB of RAM per machine (8 vCPU and 32 GB of RAM is recommended for leaf nodes to align with license unit calculations)
- Running Linux kernel 2.6.32 or later
- Each MemSQL Pod needs to be able to communicate other MemSQL Pods in the same cluster over port 3306
- The Kubernetes worker nodes/host systems must meet the specified system requirements as outlined in our System Requirements documentation.
Consideration should be given to future expansion needs. We recommend ensuring that
allowVolumeExpansion is set to
true to enable future storage size increases. Refer to the Kubernetes documentation for more information.