A newer version of Hazelcast Operator is available.

View latest

Deploy Management Center with the Hazelcast Platform Operator for Kubernetes

In this tutorial, you’ll deploy an instance of Management Center using Hazelcast Platform Operator for Kubernetes.

Before you Begin

You need a Kubernetes or Openshift cluster, and the kubectl or oc command-line tool must be configured to communicate with your cluster.

Please make sure Hazelcast Platform Operator for Kubernetes is up and running.

Deploy Management Center

You can monitor the Hazelcast cluster by starting Management Center.

  • Open Source

  • Enterprise

  1. Create the ManagementCenter custom resource file and name it management-center.yaml.

    apiVersion: hazelcast.com/v1alpha1
    kind: ManagementCenter
    metadata:
      name: managementcenter-sample
    spec:
      repository: 'hazelcast/management-center'
      version: '5.3.1'
      externalConnectivity:
        type: LoadBalancer
      hazelcastClusters:
        - address: hazelcast-sample
          name: dev
  2. Apply it with the following command to start Management Center.

    For Kubernetes
    kubectl apply -f management-center.yaml
    For Openshift
    oc apply -f management-center.yaml
  3. After a moment, you can verify that Management Center is up and running by checking the Management Center logs.

    For Kubernetes
    kubectl logs pod/managementcenter-sample-0
    For Openshift
    oc logs pod/managementcenter-sample-0
2021-08-26 15:21:04,842 [ INFO] [MC-Client-dev.lifecycle-1] [c.h.w.s.MCClientManager]: MC Client connected to cluster dev.
2021-08-26 15:21:05,241 [ INFO] [MC-Client-dev.event-1] [c.h.w.s.MCClientManager]: Started communication with member: Member [10.36.8.3]:5701 - ccf31703-de3b-4094-9faf-7b5d0dc145b2
2021-08-26 15:21:05,245 [ INFO] [MC-Client-dev.event-1] [c.h.w.s.MCClientManager]: Started communication with member: Member [10.36.7.2]:5701 - e75bd6e2-de4b-4360-8113-040773d858b7
2021-08-26 15:21:05,251 [ INFO] [MC-Client-dev.event-1] [c.h.w.s.MCClientManager]: Started communication with member: Member [10.36.6.2]:5701 - c3d105d2-0bca-4a66-8519-1cacffc05c98
2021-08-26 15:21:07,234 [ INFO] [main] [c.h.w.Launcher]: Hazelcast Management Center successfully started at http://localhost:8080/

To enable some features or dashboard at Management Center, you need a license key. If you don’t have a license key, you can request one from the Hazelcast website.

  1. Create a Kubernetes secret to hold your license key.

    For Kubernetes
    kubectl create secret generic hazelcast-license-key --from-literal=license-key=<YOUR LICENSE KEY>
    For Openshift
    oc create secret generic hazelcast-license-key --from-literal=license-key=<YOUR LICENSE KEY>
  2. Create the ManagementCenter custom resource file and name it management-center.yaml.

    apiVersion: hazelcast.com/v1alpha1
    kind: ManagementCenter
    metadata:
      name: managementcenter-sample
    spec:
      repository: 'hazelcast/management-center'
      version: '5.3.1'
      licenseKeySecretName: hazelcast-license-key
      externalConnectivity:
        type: LoadBalancer
      hazelcastClusters:
      - address: hazelcast-sample
        name: dev
  3. Apply it with the following command to start Management Center.

    For Kubernetes
    kubectl apply -f management-center.yaml
    For Openshift
    oc apply -f management-center.yaml
  4. After a moment, you can verify that Management Center is up and running by checking the Management Center logs.

    For Kubernetes
    kubectl logs pod/managementcenter-sample-0
    For Openshift
    oc logs pod/managementcenter-sample-0
2021-08-26 15:21:04,842 [ INFO] [MC-Client-dev.lifecycle-1] [c.h.w.s.MCClientManager]: MC Client connected to cluster dev.
2021-08-26 15:21:05,241 [ INFO] [MC-Client-dev.event-1] [c.h.w.s.MCClientManager]: Started communication with member: Member [10.36.8.3]:5701 - ccf31703-de3b-4094-9faf-7b5d0dc145b2
2021-08-26 15:21:05,245 [ INFO] [MC-Client-dev.event-1] [c.h.w.s.MCClientManager]: Started communication with member: Member [10.36.7.2]:5701 - e75bd6e2-de4b-4360-8113-040773d858b7
2021-08-26 15:21:05,251 [ INFO] [MC-Client-dev.event-1] [c.h.w.s.MCClientManager]: Started communication with member: Member [10.36.6.2]:5701 - c3d105d2-0bca-4a66-8519-1cacffc05c98
2021-08-26 15:21:07,234 [ INFO] [main] [c.h.w.Launcher]: Hazelcast Management Center successfully started at http://localhost:8080/

To access the Management Center dashboard, open the browser at address http://$MANCENTER_IP:8080.

  • Kubernetes

  • Openshift

MANCENTER_IP=$( kubectl get service managementcenter-sample -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
MANCENTER_IP=$( oc get service managementcenter-sample -o jsonpath='{.status.loadBalancer.ingress[0].ip}')

If EXTERNAL-IP of the service is hostname, not IP, you can run command below:

  • Kubernetes

  • Openshift

MANCENTER_IP=$( kubectl get service managementcenter-sample -o jsonpath='{.status.loadBalancer.ingress[0].hostname}')
MANCENTER_IP=$( oc get service managementcenter-sample -o jsonpath='{.status.loadBalancer.ingress[0].hostname}')

Step 4. Clean up

You can run the commands below to remove the Management Center.

  • Kubernetes

  • Openshift

kubectl delete -f management-center.yaml
oc delete -f management-center.yaml

Next Steps

Learn how to expose Hazelcast clusters outside Kubernetes so you can connect external clients to them.