https://github.com/pires/hazelcast-kubernetes-bootstrapper
Hazelcast cluster discovery mechanism for Kubernetes.
https://github.com/pires/hazelcast-kubernetes-bootstrapper
hazelcast in-memory-database java kubernetes
Last synced: about 1 year ago
JSON representation
Hazelcast cluster discovery mechanism for Kubernetes.
- Host: GitHub
- URL: https://github.com/pires/hazelcast-kubernetes-bootstrapper
- Owner: pires
- License: apache-2.0
- Created: 2014-12-24T00:31:41.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2022-10-05T02:50:09.000Z (over 3 years ago)
- Last Synced: 2025-03-24T14:09:43.441Z (over 1 year ago)
- Topics: hazelcast, in-memory-database, java, kubernetes
- Language: Java
- Size: 118 KB
- Stars: 22
- Watchers: 5
- Forks: 9
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
hazelcast-kubernetes-bootstrapper
=================================
Hazelcast (3.12.3) cluster discovery mechanism for Kubernetes.
## What is
[Kubernetes](http://kubernetes.io) is an open source orchestration system for Docker containers. It handles scheduling onto nodes in a compute cluster and actively manages workloads to ensure that their state matches the users declared intentions. Using the concepts of "labels" and "pods", it groups the containers which make up an application into logical units for easy management and discovery.
In order to cluster Hazelcast in Kubernetes - and harness full scale-up/down capabilities provided -, each instance must know beforehand which ```pods``` containing Hazelcast instances are already up & running, so that networking may be configured properly. This is achieved by means of looking-up ```pods``` with certain ```labels``` in [Kubernetes API](https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/accessing_the_api.md).
The code provided does that and configures Hazelcast TCP clustering.
To configure Hazelcast inside of the Kubernetes cluster the following environment options can be used:
* `HAZELCAST_SERVICE` - name of the Hazelcast service, declared in the Kubernetes service configuration. Default: `hazelcast`.
* `DNS_DOMAIN` - domain name used inside of the cluster. Default: `cluster.local`.
* `POD_NAMESPACE` - namespace in which hazelcast should be running. Default: `default`. Use the [Downward API](https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/downward_api.md) to set it automatically.
* `HC_GROUP_NAME` - Hazelcast group name. Default: `someGroup`.
* `HC_GROUP_PASSWORD` - Hazelcast group password. Default: `someSecret`.
* `HC_PORT` - Port on which Hazelcast should be running.
* `HC_REST_ENABLED` - Whether to enable Hazelcast REST API. Default: `false`.
This is used in [pires/hazelcast-kubernetes](https://github.com/pires/hazelcast-kubernetes).
## Pre-requisites
* JDK 8
* Maven 3.0.5 or newer
## Build
```
mvn clean package
```