Running an Integration in Dev Mode

Camel K provides a specific flag for quickly iterating on integrations during development and have fast feedbacks on the code you’re writing. It’s called dev mode.

Differently from other frameworks, artifacts generated by Camel K in dev mode are no different from the one you run in production. Dev mode is just a helper to let you be quicker during development.

To enable dev mode, just add the --dev flag when running the integration:

kamel run examples/languages/ --dev

The --dev flag deploys immediately the integration and shows the integration logs in the console. You can then change the code and see the changes automatically applied (instantly) to the remote integration pod.

The console follows automatically all redeploys of the integration.

Here’s an example of the output:

$ kamel run examples/languages/ --dev
integration "sample" created
integration "sample" in phase Initialization
integration "sample" in phase Building Kit
integration "sample" in phase Deploying
integration "sample" in phase Running
[1] Monitoring pod sample-56fb69c989-42gmw[1] Starting the Java application using /opt/run-java/ ...
[1] exec java -XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:MinHeapFreeRatio=20 -XX:MaxHeapFreeRatio=40 -XX:+ExitOnOutOfMemoryError -cp ./resources:/etc/camel/conf:/etc/camel/resources:/etc/camel/sources/i-source-000:dependencies/com.sun.xml.bind.jaxb-core- org.apache.camel.k.main.Application
[1] OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=N
[1] 2019-12-16 11:33:42.916 INFO  [main] ApplicationRuntime - Add listener: org.apache.camel.k.listener.ContextConfigurer@12b0404f
[1] 2019-12-16 11:33:42.919 INFO  [main] ApplicationRuntime - Add listener: org.apache.camel.k.listener.RoutesConfigurer@4313f5bc
[1] 2019-12-16 11:33:42.920 INFO  [main] ApplicationRuntime - Add listener: org.apache.camel.k.listener.RoutesDumper@2b6faea6
[1] 2019-12-16 11:33:42.934 INFO  [main] RuntimeSupport - Looking up loader for language: java
[1] 2019-12-16 11:33:42.939 INFO  [main] RuntimeSupport - Found loader for language java from service definition
[1] 2019-12-16 11:33:43.644 INFO  [main] RoutesConfigurer - Loading routes from: file:/etc/camel/sources/i-source-000/
[1] 2019-12-16 11:33:43.644 INFO  [main] ApplicationRuntime - Listener org.apache.camel.k.listener.RoutesConfigurer@4313f5bc executed in phase ConfigureRoutes
[1] 2019-12-16 11:33:43.658 INFO  [main] BaseMainSupport - Using properties from: file:/etc/camel/conf/
[1] 2019-12-16 11:33:43.917 INFO  [main] ApplicationRuntime - Listener org.apache.camel.k.listener.ContextConfigurer@12b0404f executed in phase ConfigureContext
[1] 2019-12-16 11:33:43.918 INFO  [main] DefaultCamelContext - Apache Camel 3.0.0 (CamelContext: camel-k) is starting
[1] 2019-12-16 11:33:43.919 INFO  [main] DefaultManagementStrategy - JMX is disabled
[1] 2019-12-16 11:33:44.099 INFO  [main] DefaultCamelContext - StreamCaching is not in use. If using streams then its recommended to enable stream caching. See more details at
[1] 2019-12-16 11:33:44.109 INFO  [main] DefaultCamelContext - Route: route1 started and consuming from: timer://tick
[1] 2019-12-16 11:33:44.116 INFO  [main] DefaultCamelContext - Total 1 routes, of which 1 are started
[1] 2019-12-16 11:33:44.119 INFO  [main] DefaultCamelContext - Apache Camel 3.0.0 (CamelContext: camel-k) started in 0.199 seconds
[1] 2019-12-16 11:33:44.123 INFO  [main] ApplicationRuntime - Listener org.apache.camel.k.listener.RoutesDumper@2b6faea6 executed in phase Started
[1] 2019-12-16 11:33:45.127 INFO  [Camel (camel-k) thread #1 - timer://tick] route1 - Hello Camel K!

You can write your own integration from scratch or start from one of the examples available in the release page.