Why Camel K?
In this article, let us see five reasons for using camel-k and how it is different from a normal camel application deployed in Kubernetes or OpenShift.
Join the DZone community and get the full member experience.
Join For Free1. Dev Mode
To run a camel spring boot or camel main application in Kubernetes, it requires a developer to build the docker or s2i images, create Kubernetes resources and then apply the resources to a running cluster which is very time-consuming. Camel K solves this problem and saves development time with the dev mode. Simply adding a --dev flag while running code allows the developer to deploy instantly to Kubernetes and also make any changes to the running pod whenever the source file is updated.
2. Dependency Resolution
We know that camel supports multiple DSL such as Java or Groovy and Camel K supports it as well. What is new in Camel K is that the automatic dependencies management feature. The developer need not worry about packaging a deployable artifact or the maven or Gradle dependencies of various components. It automatically resolves the necessary dependencies from a source file during deployment. And also only one source file is enough to run integration in a pod.
3. Cluster Administration
There is always a lot of administration activities involved while working with Openshift or Kubernetes like creating Services, Routes, ConfigMaps, etc.. Camel K reduces the efforts of such activities. For example, if a camel route has a periodic behavior such as timer/quartz, Camel K detects and creates a CronJob in OpenShift. This helps the developers to be more business-oriented without waiting for the administrators to create such resources.
4. Quarkus Runtime
Camel K offers an option to run the camel application in quarkus runtime. By that way, the application becomes much faster responsive, quicker bootup time, and also very less in size. Currently, it supports JVM mode in their first GA release with an assurance of Native mode support in their next releases. The community claims that Camel K is made for lightweight microservices and quarkus becomes a default runtime too with this fix #1513.
5. Serverless
Camel K also provides an option to deploy a particular application as serverless with Knative or OpenShift Serverless so that it automatically scales to zero or scale-up for load or resource optimizations. It deploys the application as Knative Service and creates the necessary resources like route/ingress automatically.
Summary
Camel K takes camel to another level in the Kubernetes environment while making use of all the goodness of camel. It also has a lot of interesting Traits that serve different purposes like creating Jolokia agents, 3scale discovery, and Prometheus integration. However, this is completely a new framework as the first GA release happened this month only. I hope it will evolve a lot in the future.
Opinions expressed by DZone contributors are their own.
Comments