Getting Started with SnappyData on Kubernetes
Kubernetes is an open source project designed for container orchestration. SnappyData can be deployed on Kubernetes.
This following sections are included in this topic:
The following prerequisites must be met to deploy SnappyData on Kubernetes:
Kubernetes cluster A running Kubernetes cluster of version 1.9 or higher.
Helm tool Helm tool must be deployed in the Kubernetes environment. Helm comprises of two parts, that is a client and a Tiller (Server portion of Helm) inside the kube-system namespace. Tiller runs inside the Kubernetes cluster and manages the deployment of charts or packages. You can follow the instructions here to deploy Helm in your Kubernetes enviroment.
Deploying SnappyData on Kubernetes
SnappyData Helm chart is used to deploy SnappyData on Kubernetes. It uses Kubernetes statefulsets to launch the locator, lead, and server members.
To deploy SnappyData on Kubernetes:
Clone the spark-on-k8s repository and change to charts directory.
git clone https://github.com/SnappyDataInc/spark-on-k8s
Optionally, go to snappydata > values.yaml file to edit the default configurations in SnappyData chart. Configurations can be specified in the respective attributes for locators, leaders, and servers in this file. Refer List of Configuration Parameters for SnappyData Chart
Install the snappydata chart using the following command:
helm install --name snappydata --namespace snappy ./snappydata/
The above command installs the SnappyData chart in a namespace called snappy and displays the Kubernetes objects (service, statefulsets etc.) created by the chart on the console. By default, SnappyData helm chart deploys a SnappyData cluster which consists of one locator, one lead, two servers and services to access SnappyData endpoints.
You can monitor the Kubernetes UI dashboard to check the status of the components as it takes few minutes for all the servers to be online. To access the Kubernetes UI refer to the instructions here.
SnappyData chart dynamically provisions volumes for servers, locators, and leads. These volumes and the data in it are retained even after the chart deployment is deleted.
For more details on accessing and interacting with SnappyData cluster on Kubernetes refer to SnappyData Cluster on Kubernetes