This project is generated using Helidon Starter. It showcases how seamlessly you can package and deploy your Helidon application to Kubernetes using Kubernetes Maven Plugin
With JDK11+
mvn package
java -jar target/helidon-quickstart-se.jar
$ curl -X GET http://localhost:8080/greet
{"message":"Hello World!"}
$ curl -X GET http://localhost:8080/greet/Joe
{"message":"Hello Joe!"}
$ mvn k8s:build
$ docker run --rm -p 8080:8080 helidon-quickstart-se:latest
Exercise the application as described above
Make sure you've logged into some remote Kubernetes cluster from your local machine. You can also use local Kubernetes distributions like minikube and kind for testing purposes.
$ mvn k8s:resource # Generate kubernetes manifests
$ mvn k8s:apply # Apply generated Kubernetes manifests to Kubernetes Cluster
$ kubectl get service helidon-quickstart-se # Get service info
In order to deploy to Red Hat OpenShift you'd require access to an OpenShift cluster. You can create an account at Red Hat Developer Sandbox which allows trying OpenShift for a limited period.
Once installed, you can deploy your application like this:
$ mvn oc:build oc:resource oc:apply -Popenshift