Installing on Kubernetes
Deploy a GridGain 9 cluster on Kubernetes with ConfigMaps, a StatefulSet, and an initialization job, and configure logging, probes, and autoscaling.
You can install GridGain 9 and run a GridGain cluster on Kubernetes cluster. This section describes all the necessary steps, as well as provides the configurations and manifests that you can copy and paste into your environment.
Prerequisites
Recommended Kubernetes Version
GridGain is tested on Kubernetes version 1.26.
Version Lifecycle
The information about versioning and lifecycle of GridGain 9 is available on the Versioning page.
Installation Steps
Create ConfigMaps
Create the GridGain configuration file and get a GridGain 9 license. The minimum node configuration is as follows:
ignite: { network: { # GridGain 9 node port port = 3344 nodeFinder = { netClusterNodes = [ # Kubernetes service to access the GridGain 9 cluster on the Kubernetes network "gridgain-svc-headless:3344" ] } } storage: { profiles = [ { engine = "aipersist" name = "default" replacementMode = "CLOCK" # Explicit storage size configuration sizeBytes = 2147483648 } ] } }Place your license content in the
license.conffile.Create the ConfigMap object for GridGain configuration:
kubectl create configmap gridgain-config -n <namespace> --from-file=gridgain-config.confCreate the ConfigMap object for the GridGain license:
kubectl create configmap gridgain-license -n <namespace> --from-file=license.conf
Replace <namespace> with the name of the namespace where you want to deploy GridGain.
To update GridGain node configuration, modify the existing ConfigMap and restart all GridGain pods.
Modify previously configured ConfigMap object:
Restart GridGain pod, repeat for every pod:
Configure Environment Variables and Logging
In Kubernetes deployments all environment variables must be defined directly in the container specification, either in the StatefulSet manifests or in the Helm chart configuration.
JVM and Memory Configuration
To configure JVM options (such as heap size, Metaspace, and Java agent), define the GRIDGAIN9_EXTRA_JVM_ARGS environment variable in your manifests.
For example, in a StatefulSet:
When using the Helm chart, define the same variable through the extraEnvVars field:
To generate JVM diagnostic files inside Kubernetes/Docker, pass the relevant JVM options through GRIDGAIN9_EXTRA_JVM_ARGS:
Ensure that the output directories exist and are writable inside the pod. Declare persistent volumes for diagnostic outputs and mount them into the container:
Logging Configuration
By default, the Docker image ships with a gridgain.java.util.logging.properties configuration that enables only console logging.
To modify the default logging behavior (e.g., enabling file-based logging or using log4j2), create a ConfigMap with a custom gridgain.java.util.logging.properties file and mount it into each pod.
Create the ConfigMap:
Mount it in the
StatefulSet:
If you use Helm, the same can be defined via configMaps in values.yaml:
Once both are configured, directory—file logging becomes active on startup.
Default Storage Configuration
In Kubernetes deployments, the default storage profile is defined in the ConfigMap created during installation.
You can use this configuration:
Or see the example on how to redefine it for the Helm chart.
Create and Deploy the Service
Depending on your requirements, define and deploy a Kubernetes service. Gridgain 9 use two types of services: one for internal cluster discovery, and the other -- for external client access.
First, choose a type of service you need and prepare the
service.yamlfile.
For communication inside the Kubernetes cluster, Use a headless service by setting the
clusterIPparameter toNone. This will expose each pod's IP, enabling GridGain to be partition‑aware: clients discover every node's address, determine which partition resides on which node, and send requests directly where the data is located.
Use a
LoadBalancerservice to allow external clients to connect. Keep in mind that with this option you are giving up partition awareness.If your environments does not support
LoadBalancer, you can usetype: NodePortinstead. Refer to the Kubernetes documentation for details.
Then apply the
service.yamlfile to set up this service:
Deploy the StatefulSet
Prepare the
statefulset.yamlfile for StatefulSet deployment:Apply the
statefulset.yamlfile to deploy the main components of GridGain 9:
Wait for Pods to Start
Monitor the status of the pods:
Ensure that all pods'
STATUSisRunningbefore proceeding.
Deploy the Job
Prepare the
job.yamlfile for deploying the job:Apply the
job.yamlfile to complete installation.
Installation Verification
Check the status of all resources in your namespace:
Ensure that all components are running as expected, without errors, and that the initialization job is in the
Completedstatus.Verify that your cluster is initialized and running.
The command output must include the name of your cluster and the number of nodes. The status must be ACTIVE.
Optional: Liveness and Readiness Probes
You can set up configuration for readiness and liveness probes.
Liveness probe checks if the GridGain node has started in the pod, and responds to REST requests on the liveness endpoint.
Readiness probe checks if the GridGain node has joined the cluster and is ready to receive data.
The example below shows how to set up liveness and readiness probes with recommended defaults:
For more information about the REST endpoints, see the OpenAPI specification.
Optional: KEDA Configuration
You can configure KEDA to automatically scale the cluster based on your needs, ensuring optimal resource optimization and performance. This implementation uses Prometheus to monitor cluster load.
To enable KEDA scaling for your cluster:
Add the necessary Helm repositories, install KEDA and Prometheus:
Deploy the KEDA configurations:
The
keda-scaled-object.yamlconfiguration defines the scaling rules for the GridGain cluster:The
keda-recovery-scaled-job.yamlconfiguration handles rebuilding CMG nodes in the GridGain cluster.
You can deploy the above configurations with the following commands:
Installation Troubleshooting
If any issues occur during the installation:
Check the logs of specific pods:
Review events in the namespace:
Troubleshooting via REST
This approach is intended for short-lived debugging and testing sessions, not for long-term or external access.
Forward the REST port to a specific GridGain 9 replica:
Example:
Open a new terminal and run REST requests to the
http://localhost:10300, for example:
For more information refer to the documentation:
kubectlcommand reference: kubectl port-forwardGridGain 9 REST API docs: REST API
Limitations and Considerations
When running GridGain 9 in a Kubernetes environment, the node configuration becomes read-only and cannot be modified by using the gridgain9 node config update CLI command. This is by design, as node configuration is managed via Kubernetes resources. To change your configuration:
Manually update the corresponding ConfigMap;
Restart all cluster pods by executing
kubectl delete podfor each replica.
The updated configuration will take effect after the pods are recreated by the Kubernetes controller.
This page is: Copyright © 2026 MariaDB. All rights reserved.
Last updated
Was this helpful?

