Monday 19 November 2018

Quick start Infinispan on Kubernetes

Last week we showed you how to easily run Infinispan on top of OpenShift. This week we're trying to do the same on Minikube, a tool that makes it easy to run vanilla Kubernetes locally.

Although we've already covered the topic in the past, we felt the descriptors needed a permanent location and an update to the latest Infinispan releases. Detailed instructions can be found in this repository.

With OpenShift, we took advantage of Templates which allow a set of objects to be parameterised.
Templates are OpenShift specific, so Kubernetes does not understand them. Instead, we provide you with the individual descriptors required to run Infinispan (Helm chart to come...). This includes:


Before applying the descriptors, download and install Minikube. Then, set a profile, select the VM driver, give it enough CPU and memory for your experiments, and start it.

Once Minikube it's running and you have the corresponding kubectl command line tool installed, simply call:

$ kubectl apply -f .

Once all pods are ready, you should verify the 3-node cluster has formed correctly (find out how in the README file).

When ready, you can start storing and retrieving data. The HTTP REST endpoint is particularly useful for these initial tests, to verify everything works as expected:

$ kubectl exec \
  -it infinispan-server-0 \
  -- curl -v -u test:changeme -H 'Content-type: text/plain' -d 'test' infinispan-server-http:8080/rest/default/stuff

Then:

$ kubectl exec -it infinispan-server-1 \
  -- curl -v -u test:changeme infinispan-server-http:8080/rest/default/stuff

Go and try it out and let us know what you think. You can find us on this Zulip chat :)

Cheers,
Galder

No comments:

Post a Comment