For a study project I got the task to deploy route definitions to openshift for automated route generation. I need to use openshift and camel k for this task. My problem is that no matter what I do, I am not able to reach my endpoint. Here are the things I already did:
- Walked through this tutorial: https://developers.redhat.com/blog/2019/04/25/build-and-deploy-an-api-with-camel-k-on-red-hat-openshift/
but since camel K 1.3.1 this tutorial seems to not work anymore...
I found a tutorial about jetty, but in the end I got the info that for http endpoints in camel there is quarkus being used.
When starting to describe my endpoint in camel k I need to specify a kind of path and here is where things got complicated.
Whatching a tutorial (https://www.youtube.com/watch?v=YpVVXDnZLPo&t=385s) from Tom D I copied everything he did but the difference is he specifies a local host endpoint whereas I try to reach an endpoint in openshift.
import java.time.Period;
import org.apache.camel.builder.RouteBuilder;
public class RestVersuch extends RouteBuilder {
@Override
public void configure() throws Exception {
///apis/camel.apache.org/v1/namespaces/pidi-dario/integrations/rest-versuch
rest()
.path("/rest-versuch")
.get()
.route()
.transform(simple("GET funktioniert!"))
.endRest()
.post()
.route()
.to("log:info")
.transform(simple("POST funktioniert!"))
.endRest();
}
}
youtube snap from example code
As you can see in the pictures everything seems to work fine BUT for some reason camel shuts down shortly after starting the service from my cmd (as an admin):
When I try to open the app from openshifts direct link that you can see in picture 4 I only get a a massage that my app is not available.
Since I am very new to this topic I really hope any of you guys can help me in this particular situation! Thanks for your time reading this post :)!