Skip to content

MeroRai/payara-hazelcast-kubernetes

Repository files navigation

payara-hazelcast-kubernetes

Demonstration of Payara Micro using Hazelcast-Kubernetes plugin

Prerequisites

This demonstration assumes:

  1. Minikube is installed and that you have also installed Kubectl, which is a command-line tool for Kubernetes.
  2. Docker is installed.
  3. You have basic knowledge on Kubernetes, Docker and Hazelcast.

To run the demonstration

  1. Edit the "hazelcast.xml" file to match your service name, label name and value.
  2. Create service for the first instance by executing the folowing command:
$ kubectl create -f payaraMicroService.yaml
  1. Create deployment for the first instance by executing the following command:
$ kubectl create -f payaraMicroDeployment.yaml
  1. Create service for the second instance by executing the folowing command:
$ kubectl create -f payaraMicro2Service.yaml
  1. Create deployemnt for the second instance by executing the following command:
$ kubectl create -f payaraMicro2Deployment.yaml
  1. Insert string “{data}” into the first instance using:
$ curl -H "Accept: application/json" -H "Content-Type: application/json" -X PUT -d "{data}" http://<NODE-IP-ADDRESS>:30001/rest-jcache/webresources/cache\?key\=test
  1. Use second instance to retrieve the added value using:
$ curl http://<NODE-IP-ADDRESS>:30002/rest-jcache/webresources/cache\?key\=test{data}%

About

Demo of Payara Micro usin Hazelcast-Kubernetes plugin

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published