Getting Started with Hazelcast Platform Operator

See something wrong? Edit this page.

This sample is a guideline on how to start and use Hazelcast Platform Operator.

You can see the whole project here.

What You’ll Learn

In this guide, you will deploy a Hazelcast cluster to Kubernetes using Hazelcast Platform Operator.


  • Up and running Kubernetes cluster (version 1.9 or higher)

  • Kubernetes command-line tool, kubectl

Deploy Hazelcast Platform Operator

To deploy Hazelcast Platform Operator, you need to apply bundle.yaml that includes all the operator components:

kubectl apply -f

Check the CRDs to make sure they were successfully created:

$ kubectl get crd
NAME                              CREATED AT          2021-11-15T14:37:36Z   2021-11-15T14:37:36Z

Check that the operator is up and running:

$ kubectl get deployment
NAME                                    READY   UP-TO-DATE   AVAILABLE   AGE
hazelcast-platform-controller-manager   1/1     1            1           14m

Create Hazelcast cluster

Hazelcast Platform Operator can create both Enterprise and Community Hazelcast clusters. To create the cluster, you need to apply the Hazelcast Custom Resource.

  • Hazelcast Platform Enterprise cluster

  • Hazelcast Platform cluster

For the Hazelcast Platform Enterprise, you need to create a secret with the Hazelcast Enterprise license key.

kubectl create secret generic hazelcast-license-key --from-literal license-key=<hazelcast-license-key>

Then run the following command to create the cluster.

cat <<EOF | kubectl apply -f -
kind: Hazelcast
  name: my-hazelcast
  repository: ''

For the Hazelcast Platform, run the following command to create the cluster.

cat <<EOF | kubectl apply -f -
kind: Hazelcast
  name: my-hazelcast

Check Hazelcast cluster status

To check that the Hazelcast cluster is formed, you can check the status of the Hazelcast Custom Resource.

$ kubectl get hazelcast my-hazelcast
hazelcast   Running   3/3

For a more detailed view, you can see the yaml format.

$ kubectl get hazelcast my-hazelcast -o=yaml
kind: Hazelcast
  clusterName: dev
  clusterSize: 3
  exposeExternally: {}
  licenseKeySecret: hazelcast-license-key
  version: "5.0-slim"
    readyMembers: 3/3
  phase: Running

Create ManagementCenter

Hazelcast Platform Operator can also create ManagementCenter. For this, run the following command.

cat <<EOF | kubectl apply -f -
kind: ManagementCenter
  name: my-managementcenter
  repository: 'hazelcast/management-center'
  version: '5.0'
  licenseKeySecret: hazelcast-license-key

It will create the ManagementCenter Custom Resource and will deploy the ManagementCenter application. Run the following command to check that the ManagementCenter was successfully deployed.

$ kubectl get managementcenter my-managementcenter
NAME               STATUS
managementcenter   Running

This configuration will expose ManagementCenter using LoadBalancer external IP.

$ kubectl get svc
NAME               TYPE           CLUSTER-IP      EXTERNAL-IP   PORT(S)                        AGE
hazelcast          ClusterIP   <none>        5701/TCP                       11m
managementcenter   LoadBalancer  8080:31720/TCP,443:31858/TCP   2m57s

Open [MANAGEMENT-CENTER-EXTERNAL-IP]:8080 in your browser to access the ManagementCenter UI.

Clean up

To delete the Hazelcast cluster and ManagementCenter, delete the Custom Resources.

$ kubectl delete hazelcast my-hazelcast "my-hazelcast" deleted

$ kubectl delete managementcenter my-managementcenter "my-managementcenter" deleted

If you deployed the Hazelcast Platform Enterprise cluster, you might also want to delete the license secret.

kubectl delete secret hazelcast-license-key

Deletion of the managementcenter resource will not delete the PersistentVolume and the PersistentVolumeClaim. You will need to delete them manually.

Use kubectl delete command to undeploy the operator.

kubectl delete -f


In this example, we have seen how to use Hazelcast Platform Operator to deploy and manage a Hazelcast Platform cluster and ManagementCenter.