Getting Started with GigaSpaces in Kubernetes
This topic describes how to deploy GigaSpaces products in a Kubernetes environment. The integration is packaged as a Helm chart. You can deploy the full InsightEdge Platform, which includes the data grid, using the Helm chart available in the GigaSpaces Helm repository.
Kubernetes can be installed in two ways:
Use a basic Helm chart to start Manager, and then use GigaSpaces Tools (Ops Manager/CLI/API) for Processing Units management. This method uses Kubernetes Operator and provide all GigaSpaces functionality. It is the default and is described below.
Use Helm charts only. If you use Helm Charts only, Scale Out/In and deploying/undeploying a service are not available using the Ops Manager or the Command Line Interface.
See Getting Started with GigaSpaces in Kubernetes Using Helm Charts Only for details on how to install Kuberbetes via Helm charts only.
The topics in this section assume basic knowledge of InsightEdge and the data grid. If you aren't familiar with the data grid (at minimum), review the contents of the general Getting Started section before performing the tasks described here.
Before beginning to work with the Space and InsightEdge, ensure that you have the following installed on your local machine or a VM:
This topic describes how to do basic and intermediate-level deployment tasks for the Space and InsightEdge using simple Helm commands. You can perform these tasks using a Kubernetes minikube, because you only need a single node.
The deployment and maintenance tasks described below use
InsightEdge Helm charts commands. However, you can also perform these tasks using the
xap Helm charts commands.
Deploying and Managing a Space
In this topic, you will learn how to do the following:
- Get the required initial GigaSpaces Helm Chart
- Deploy Platform manager
- Start a Space in Kubernetes
- Monitor your Space using Kubernetes tools
- Delete your Space
The Helm package manager is used for installing InsightEdge and GigaSpaces in the Kubernetes environment. Helm makes deploying complex applications more portable, supports automatic rollbacks, and is a familiar pattern for developers that is easy to understand. Moreover, since Helm is open source, there are many community charts available with standard configurations for common application services.
A Helm chart can be used in a variety of formats and locations; packaged, unpackaged, accessed via a remote URL or even in a chart repository. The
smart-augmented-transactions Helm charts are published in the GigaSpaces Helm charts repository at
Two ways to access and install these charts, in order to install a GigaSpaces product in Kubernetes, are discussed below:
- Option 1: Install a chart directly from the repo and add the GigaSpaces Helm chart repo to the Helm repo list.
- Option 2: Unpack the required Helm chart(s) in a local folder.
Option 1: Add a Helm Repo to the Repo List
You can point to the GigaSpaces Helm repo, so that Helm can locate the
insightedge charts for installation:
helm repo add gigaspaces https://resources.gigaspaces.com/helm-charts
After adding the GigaSpaces Helm repo, you can install the required chart(s) by referencing the chart name and product package version.
The example command format is shown below.
helm <<command>> gigaspaces/<<name-of-helm-chart>> --version=15.8.0 <<parameters>>
If you're using minikube, note that the default kubernetes services created by GigaSpaces uses LoadBalancer, which requires running 'minikube tunnel' in the background. For more information see minikube tunnel.
Option 2: Fetch the GigaSpaces Helm Charts from the GigaSpaces Repository
Another option is to fetch the GigaSpaces Helm charts that you need and unpack them locally, so you don’t have to repeat the repo name and package version in each command (which has the added benefit of making the commands shorter). For example, you can
fetch (Helm 2) or
pull (Helm 3)
helm pull gigaspaces/insightedge-manager --version=15.8.0 --untar
helm fetch gigaspaces/insightedge-manager --version=15.8.0 --untar
The chart is unpacked in a local folder called
insightedge, which is referenced in the Helm commands.
The example command format is shown below.
helm <<command>> <<name-of-helm-chart>> <<parameters>>
You must fetch every chart that you will be using (for example xap, xap-pu and xap-manager) in your GigaSpaces application environment.
Deploying the Platform Manager
In order to prepare the environment for use, first the Platform Manager must be deployed. This deploys two pods: the Manager pod, and the Operator pod.
Note that Platform Manager is deployed by using a Helm chart, but further operations are performed using the UI, CLI or REST-API tools.
Type the following Helm command to create a Management Pod called
testmanager that deploys Manager and Operator pods:
helm install testmanager insightedge-manager
helm install insightedge-manager --name testmanager
Deploy a Space using GigaSpaces Tools
After the Management Pod has been deployed and the Platform Manager is available, you can deploy the Space instances and connect them to the Platform Manager.
Monitoring the Cluster in Kubernetes
You can monitor the cluster you deployed using any of the following administration tools.
- Helm: Run the following command to print the status of the "demo' release in the command window.
helm status testmanager
- Kubernetes dashboard: run the following command to open a dashboard in your browser, where you can see all the Pods and services by clicking the various tabs. For example, if you're using minikube:
- Kubectl: run the following command to print the name, description, and status of the Pods in the command window. A list of events is also printed, which can be used for troubleshooting purposes. For example, if you detected a problem in one of the Pods, you can see the Pod termination reason and exit code.
kubectl describe pod
Deleting a Space from the Kubernetes Environment
A Space can be deleted by using the Undeploy feature of the Ops Manager UI.
Additional Helm Charts Available in the GigaSpaces Repo
To enable users to customize the installation, we provide several additional Helm charts that can be used to define specific constellations in more advanced scenarios:
- Manager (
- Processing Unit (
- Apache Zeppelin (
Before using these charts for the first time, you must fetch the chart, as described in Accessing the GigaSpaces Helm Charts above.