GridGain Developers Hub

GridGain Operator Configuration

This section describes how to configure GridGain Operator.

Namespace Configuration

Create a Kubernetes namespace in which to deploy GridGain operator

kubectl create namespace <namespace-name>

We suggest that you use the predefined namespace apache-ignite-operator.

Install Custom-Resource Definitions

The CustomResourceDefinition (CRD) API resource defines custom resources that are used by the operator
  1. Download the GridGain Operator bundle, as described in Download GridGain Operator

  2. Install the GridGain CRDs by running the following command:

    kubectl apply -f crds.yaml

RBAC Configuration

To manipulate and change Kubernetes resources, the operator needs permissions. Therefore, ClusterRole Bindings specifications that are needed by GridGain Operator are generated by the following commands:

kubectl apply -f role.yaml
kubectl apply -f service_account.yaml
kubectl apply -f role_binding.yaml

The name of the subjects in the ClusterRoleBinding definition must match the name of the ServiceAccount component that is specified when you install the component by using kubectl apply -f service_account.yaml [1].

The namespace of the subjects in the ClusterRoleBinding definition must match the namespace that is specified in the section Create a namespace

For example, consider the following ClusterRoleBinding definition:

kind: ClusterRoleBinding
  name: apache-ignite-operator
- kind: ServiceAccount
  name: apache-ignite-operator [1]
  namespace: apache-ignite-operator [2]
  kind: ClusterRole
  name: apache-ignite-operator

The definition indicates that, in your system, you should have created a namespace [1] and a ServiceAccount with a name [2].

Custom Resources Configuration

You can use custom resources to configure Apache Ignite and GridGain clusters. There are two types of custom resources: Ignite and IgniteConfig.

Ignite Resource

Ignite resource contains high-level configuration details such as k8s namespace, cluster name, and number of nodes.

To create a resource, use the following command:

kubectl apply -f  gridgain.com_v1_ignite_cr.yaml


A namespace at which to deploy a cluster. The default value is apache-ignite-test


The name of the cluster. The default value is apache-ignite-test-cluster

cluster_type [persistence|inmemory]

Defines whether the cluster should use pure in-memory data access or use a persistence storage model.

The default value is persistence. After cluster initialization, the value cannot be changed.

When the value is set to persistence, it is mandatory to configure the StorageClass value that the operator uses to provide the required data stores.


For cluster_type: "persistence" it is mandatory to have at least one storage class configured for the Kubernetes cluster. By default, if storage_class_name is not configured explicitly, the operator tries to use the attribute is-default-class=True to find the default storage class. If the operator fails to locate the storage class, then the following error is reported:

The system is unable to locate StorageClass

This process is suitable for local development, but for production usage we suggest that you create StorageClass manually. Please check your environment for more details:

You can check the available storage classes by using kubectl get sc and then set the appropriate storage class inside gridgain.com_v1_ignite_cr.yaml using:

  storage_class_name: "standard"

And, then apply the changes:

kubectl apply -f gridgain.com_v1_ignite_cr.yaml -n <operator-namespace>


The default cluster image is "gridgain/community:latest"`. For GridGain images, changing the value triggers a rolling upgrade procedure. For Apache Ignite, the pods are deleted and re-created.


Number of pods in the cluster, the default value is 2.

Storage Configuration

If persistent mode is in use, the following values are required. This requirement is ignored for in-memory cluster configuration. All values are in gigabytes
  • work_volume_size: 1, size of the work directory

  • pds_volume_size: 1, size of the pds volume

  • wal_volume_size: 1, size of the WAL volume

  • wal_archive_volume_size: 1, size of the WAL archive

Please refer to the developers-guide/persistence/native-persistence#configuration-properties[Configuration Properties] section for details.


Defines which modules should be included in classpath at startup.

Default value: "ignite-kubernetes,ignite-rest-http,ignite-opencensus,control-center-agent"`

Please refer to Enabling Modules section for the details.


JVM arguments passed to the GridGain instance, with a default value of "-DIGNITE_WAL_MMAP=false -DIGNITE_WAIT_FOR_BACKUPS_ON_SHUTDOWN=true"`

Please refer to Environment Variables section for the details.


Describes the state of a cluster, by default the value is not configured. The only available value is absent. Settings state="absent" triggers cluster termination logic.

IgniteConfig Resource

This custom resource is responsible for managing internal cluster configuration though the embedded XML configuration file. Please refer to GridGain configuration docs for details.

To create a resource, use the following command:

kubectl apply -f  gridgain.com_v1_ignite_configmap_cr.yaml

Cluster Configuration

You can modify GridGain or Apache Ignite configuration by changing yaml’s gridgian_conf section:

kind: IgniteConfig
  name: ignite-custom-config
  gridgian_conf: |-
          <?xml version="1.0" encoding="UTF-8"?>
          <beans xmlns=""

              <bean class="org.apache.ignite.configuration.IgniteConfiguration">

                  <property name="workDirectory" value="/ignite/work"/>

                  <property name="dataStorageConfiguration">
                      <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
                          <property name="defaultDataRegionConfiguration">
                              <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
                                  <property name="persistenceEnabled" value="true"/>
                          <property name="storagePath" value="/ignite/pds"/>
                          <property name="walPath" value="/ignite/wal"/>
                          <property name="walArchivePath" value="/ignite/walarchive"/>


                  <property name="discoverySpi">
                      <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
                          <property name="ipFinder">
                              <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.kubernetes.TcpDiscoveryKubernetesIpFinder">
                                  <property name="namespace" value="<namespace>"/>
                                  <property name="serviceName" value="<cluster_name>-service"/>

The configuration above contains two placeholders — <namespace>` and <cluster_name> — for k8s IP finder. These placeholders are replaced with the namespace and cluster_name values of Ignite Custom Resource. See Custom Resources Configuration. for details.


If you use GridGain Entrprise or Ultimate edition, you can provide a license file with license parameter:

kind: IgniteConfig
  name: ignite-custom-config
  gridgian_conf: |- <XML_CONFIG>


license: |-
            <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
              <gridgain-license version="2.1">
                  <enabled-feature name="ultimate"/>

When applied, Gridgain Operator creates a file /opt/gridgain/gridgain-license.xml.

To proivde a new license, replace the current license with the new one. The operator restarts your pods automatically.

Cluster Termination

To remove the previously deployed cluster and clean resources, remove Ignite custom resource:

kubectl delete -f gridgain.com_v1_ignite_cr.yaml -n <operator-namespace>