I have a Camel K application which contains multiple routes(each route is a Java file). my goal is to manage the routes status, for instance start certain routes and stop other running routes.
Currently I start and close the routes manually using kamel run XXX.java --pod-template pod_template.yaml --property=file:logging.properties ..., I am wondering what is the best way to achieve managing routes status via API?
My goal is achieving below using API:
- start a route
- stop a route
- list available routes
I have asked the question under apache/camel-k but still confused about the Integration CRD mentioned in the answer.
I have found that Camel K has API Camel K API unfortunately I haven't figure out how to call the APIs if it is possible?
Can someone share knowledge and help me on this? Thanks!
You an use the
kamelCLI to start and list theIntegrations available, ie:The above will use Kubernetes Custom Resource to create an
Integrationand list theIntegrationaccordinglyThere is no direct way to pause/stop/resume a route. The best thing I can suggest is to have a route per Integration and stop it via
kamel deleteCLI or equivalent Kubernetes API