Demonstration of Payara Micro using Hazelcast-Kubernetes plugin
- Minikube is installed and that you have also installed Kubectl, which is a command-line tool for Kubernetes.
- Docker is installed.
- You have basic knowledge on Kubernetes, Docker and Hazelcast.
- Edit the "hazelcast.xml" file to match your service name, label name and value.
- Create service for the first instance by executing the folowing command:
$ kubectl create -f payaraMicroService.yaml
- Create deployment for the first instance by executing the following command:
$ kubectl create -f payaraMicroDeployment.yaml
- Create service for the second instance by executing the folowing command:
$ kubectl create -f payaraMicro2Service.yaml
- Create deployemnt for the second instance by executing the following command:
$ kubectl create -f payaraMicro2Deployment.yaml
- 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
- Use second instance to retrieve the added value using:
$ curl http://<NODE-IP-ADDRESS>:30002/rest-jcache/webresources/cache\?key\=test{data}%