Deploying on Kubernetes
Discover ways to deploy Hazelcast clusters in Kubernetes environments.
Hazelcast CP Subsystem can be used safely in Kubernetes only if CP Subsystem Persistence is enabled (Enterprise Feature). Otherwise, a CP Subsystem Group may not recover after scaling the cluster or a rolling upgrade.
If you just want to play with Hazelcast on Kubernetes, execute the following commands to create a Hazelcast cluster
with 3 members in the
default namespace using the
default Service Account.
kubectl apply -f https://raw.githubusercontent.com/hazelcast/hazelcast/master/kubernetes-rbac.yaml kubectl run hazelcast-1 --image=hazelcast/hazelcast:5.1-SNAPSHOT kubectl run hazelcast-2 --image=hazelcast/hazelcast:5.1-SNAPSHOT kubectl run hazelcast-3 --image=hazelcast/hazelcast:5.1-SNAPSHOT
Hazelcast members automatically discover themselves and form one Hazelcast cluster.
|For production-grade Kubernetes deployment, use Helm chart or Kubernetes/OpenShift Operator.|
Kubernetes Operators are software extensions to Kubernetes which help you create and manage your applications. You can deploy and manage Hazelcast using the following Helm-based Operators:
hazelcast/hazelcast-operator: Hazelcast Operator hosted on Docker Hub
hazelcast/hazelcast-enterprise-operator: Red Hat certified Hazelcast Enterprise Operator hosted on Docker Hub
registry.connect.redhat.com/hazelcast/hazelcast-enterprise-operator: Hazelcast Enterprise Operator hosted on Red Hat Container Catalog
There are a few different ways in using Hazelcast Operators:
Since all the Operators mentioned above are generated from Helm Charts, their functionality and input parameters are exactly the same as in the case of Helm Charts.
Hazelcast Enterprise Operator is currently in the early alpha preview stage, but it will soon become the preferred way of installing Hazelcast in Kubernetes/OpenShift environments. For a tutorial, see Deploy a Cluster with the Enterprise Operator (Preview).
Explore some step-by-step guides about how to use Hazelcast in Kubernetes.