For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs.
Skip to content

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.

Using Helm chart is recommended, however, if you choose not to use Helm, this guide will walk you through installing GridGain on Kubernetes.

Prerequisites

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

  1. Create the GridGain configuration file and get a GridGain 9 license. The minimum node configuration is as follows:

    gridgain-config.conf
    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
          }
        ]
      }
    }
  2. Place your license content in the license.conf file.

  3. Create the ConfigMap object for GridGain configuration:

    kubectl create configmap gridgain-config -n <namespace> --from-file=gridgain-config.conf
  4. Create 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.

In Kubernetes deployments, the gridgain-config.conf file is mounted as a read-only ConfigMap, so any attempt to update it with the node config update command will fail.

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.

If -XX:MaxDirectMemorySize=<size> is not set, it can grow as high as configured max heap.

For example, in a StatefulSet:

When using the Helm chart, define the same variable through the extraEnvVars field:

Make sure that the combined memory usage including heap, direct buffers, metaspace, native overhead and storage, remains within the pod's memory limit specified in the StatefulSet.

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.

  1. First, choose a type of service you need and prepare the service.yaml file.

  • For communication inside the Kubernetes cluster, Use a headless service by setting the clusterIP parameter to None. 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 LoadBalancer service 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 use type: NodePort instead. Refer to the Kubernetes documentation for details.

  1. Then apply the service.yaml file to set up this service:

Deploy the StatefulSet

  1. Prepare the statefulset.yaml file for StatefulSet deployment:

  2. Apply the statefulset.yaml file to deploy the main components of GridGain 9:

Wait for Pods to Start

  1. Monitor the status of the pods:

  2. Ensure that all pods' STATUS is Running before proceeding.

Deploy the Job

  1. Prepare the job.yaml file for deploying the job:

  2. Apply the job.yaml file to complete installation.

Installation Verification

  1. Check the status of all resources in your namespace:

  2. Ensure that all components are running as expected, without errors, and that the initialization job is in the Completed status.

  3. 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:

Since readiness and liveness probes are highly recommended for kubernetes deployments, the statefulset.yaml provided above includes this configuration.

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.yaml configuration defines the scaling rules for the GridGain cluster:

    • The keda-recovery-scaled-job.yaml configuration 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.

  1. Forward the REST port to a specific GridGain 9 replica:

    Example:

  2. Open a new terminal and run REST requests to the http://localhost:10300, for example:

For more information refer to the documentation:

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:

  1. Manually update the corresponding ConfigMap;

  2. Restart all cluster pods by executing kubectl delete pod for 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?