Skip to main content
Version: 5.17

Configure replicated maps

A replicated map is a distributed key-value data structure in which the data is replicated to all members in the cluster. It provides full replication of entries to all members for quick access. You can create and configure replicated maps using the ReplicatedMap custom resource.

Configure a ReplicatedMap Resource​

You can use any of the following configuration options in the ReplicatedMap resource. For more information, see the API reference.

FieldDescription
nameName of the ReplicatedMap that you're creating. If empty, the custom resource (CR) name is used.
hazelcastResourceNameName of the Hazelcast resource.
inMemoryFormatInternal storage format. Use either OBJECT or BINARY.
asyncFillupSpecifies whether the ReplicatedMap is filled with entries asynchronously. The default value is true, meaning calls to the ReplicatedMap during the initial replication may return null values. If set to false, calls to the ReplicatedMap are blocked until the initial replication is complete, and no exceptions are thrown.

Example configuration​

The following ReplicatedMap custom resource creates a ReplicatedMap configuration for the Hazelcast resource that is defined in the hazelcastResourceName field.

Example configuration
yaml
apiVersion: hazelcast.com/v1alpha1
kind: ReplicatedMap
metadata:
name: replicatedmap-sample
spec:
hazelcastResourceName: hazelcast
inMemoryFormat: OBJECT
asyncFillup: true

After creating the ReplicatedMap resource, you can check its status:

shell
kubectl get replicatedmap replicatedmap-sample -o wide
NAME STATUS HAZELCAST-RESOURCE MESSAGE
replicatedmap-sample Success hazelcast