Deploying GigaSpaces with Kubernetes on Demand In the Cloud
Author | Product Version | Last Updated | Reference | Download |
---|---|---|---|---|
Alon Shoham | 15.0 | August 2019 |
Overview
This topic describes the use case of deploying a cluster on demand to run GigaSpaces in the cloud, using the Amazon Elastic Container Service for Kubernetes (Amazon EKS). There are three main steps to this process:
- Creating the Kubernetes cluster in the cloud
- Automating the Kubernetes infrastructure by installing the Kubernetes dashboard and Helm
- Automating the KubeGrid deployment for GigaSpaces with Helm.
GigaSpaces products have custom Helm charts to enable easy deployment and configuration in Kubernetes, both in the cloud and on premise. After GigaSpaces is installed, you can use the Kubernetes dashboard to monitor and administer your cluster.
After you finish working with GigaSpaces, you can easily take down the deployment from AWS until the next time it is needed.
Deploying GigaSpaces on Demand
Creating a Kubernetes Cluster
This use case utilizes eksctl (a well-known command-line utility that is used to create and manage Kubernetes clusters on Amazon EKS) to deploy and manage the Kubernetes cluster.
To deploy the cluster, follow the instructions for creating a cluster in Getting Started with eksctl. For example, this sample command creates a cluster with 30 c4.xlarge nodes and prevents updating the current context in ~/.kube/config.
eksctl create cluster --name=cluster-6 --region=us-east-1 --nodes=30
--node-type=c4.xlarge --set-kubeconfig-context=false
For more information about the eksctl utility, see the Weaveworks README on GitHub.
Deploying the Data Grid
The Helm package manager is used to install GigaSpaces in the Kubernetes environment. Follow the 2-step process described below to deploy the cluster.
If you don't already have the Helm client installed, follow the instructions in the Helm documentation to install it.
Deploying the Helm Service
To deploy the Helm Tiller service with access to manage resources in your cluster, you need to create a service account for Tiller to use. To do this, create a configuration file, apply the configuration as shown in the Service account with cluster-admin role Helm example, and then initialize it.
To deploy the Helm Tiller service, type the following command:
helm init --service-account tiller
Deploying KubeGrid
To deploy KubeGrid and the GigaSpaces demo:
-
Type the following command to access the GigaSpaces Helm charts and unpack them locally to a folder named
insightedge
:helm fetch gigaspaces/insightedge --untar
- After adding the GigaSpaces Helm charts, type the following command to deploy the GigaSpaces demo on Amazon EKS:
helm install insightedge --name demo
For more information about GigaSpaces KubeGrid deployment options, see the Deploying a Data Grid in Kubernetes topic.
Deploying the Kubernetes Dashboard
You can deploy the Kubernetes dashboard in Amazon EKS, in order to properly administer your Kubernetes-based GigaSpaces application.
To deploy the dashboard in Amazon EKS:
-
Initialize the dashboard by typing the following command:
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0-beta4/aio/deploy/recommended.yaml
-
To access the dashboard, type the following command:
kubectl proxy
Kubectl makes the dashboard available at http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/.
For more information about the Kubernetes dashboard and how to use it to monitor your cluster, see the Web UI (Dashboard) topic in the Kubernetes documentation.
Removing the GigaSpaces Deployment from the Cloud
When you are done working with the GigaSpaces application in the cluster, you can take it down from AWS. You need to first delete the application, and then you can delete the cluster.
To remove the GigaSpaces deployment from the cloud:
To delete GigaSpaces, type the following command:
helm del --purge demo
To delete the Kubernetes cluster from AWS, type the following command:
eksctl delete cluster --name=cluster-6 --region=us-east-1