Deploying and Managing a GigaSpaces Service in Kubernetes Using kubectl

Configuring the Platform Manager

The first step in deploying a Space is to configure the GigaSpaces Manager.

helm install test insightedge-manager 

Using the Processing Unit Custom Resource to Deploy the Space Cluster

GigaSpaces uses the Custom Resources Definition (CRD) feature of Kubernetes to define a resource type called Processing Unit. With a properly defined yaml file, the kubectl apply command can be used to deploy a GigaSpaces Processing Unit.

For example, in the command line execute the following command to deploy the yamlfile called filename.yaml:

kubectl apply -f filename.yaml

Click below to see a sample yaml file. This sample file specifies four primary instances, four backup instances, and also specifies that each backup instance will be on a different host than its primary instance.

The Processing Unit will use one stateful set per stateful pu.


kind: ProcessingUnit

metadata :

name: data-processor

namespace: default

spec :

partitions: 4

ha: true

antiAffinity: true


repository: gigaspaces/xap-enterprise

tag: 16.1.0

javaHeap: limit-150Mi

license: tryme


name: testmanager

ports :

api: 8090

multiCast: false

productType: xap

properties: image.tag=16.1.0;image.repository=gigaspaces/xap-enterprise;pu.dynamic-partitioning=true


resources :

 limits :

  cpu: null

  memory: 550Mi

requests: null

Note the highlighted entries in the yaml file:

  • kind: ProcessingUnit
    • Specifies the Processing Unit custom resource type

  • partitions: 4

    • Four primary instances are deployed

  • ha: true

    • Four additional backup instances are deployed

  • antiAffinity: true

    • Applicable only if ha: true. If this option is set to true, then the four backup instances will each be deployed on a different host from their primary instance.

Displaying the Status of the Space Cluster

Enter the following command to see the status of the Processing Units:

kubectl get pus

Sample output appears as follows:

Deleting the Space Cluster

Enter the following command to delete a Processing Unit:

kubectl delete pu name-of-processing-unit