Installation

Camel K allows us to run Camel integrations directly on a Kubernetes or OpenShift cluster. To use it, you need to be connected to a cloud environment or to a local cluster created for development purposes (ie, Minikube or Kind).

Registry requirements

Camel K may require a container registry which is used to store the images built for your applications. Certain clusters may use their internal container registry (ie, Openshift, Minikube or KEP-1755 compatible clusters). If it’s not the case for your cluster make sure to have a container registry available and set it according the specific installation methodology chosen.

Installation via Helm Hub

Camel K is also available in Helm Hub:

$ helm repo add camel-k https://apache.github.io/camel-k/charts/
$ helm install camel-k [--set platform.build.registry.address=<my-registry>] camel-k/camel-k --force
the --force option may be required to override the platform configuration with the registry values provided.

More instructions on the Camel K Helm page.

Installation via Operator Hub

Camel K is also available in Operator Hub. You will need the OLM framework to be properly installed in your cluster. More instructions on the Camel K Operator Hub page.

$ kubectl create -f https://operatorhub.io/install/camel-k.yaml

You can edit the Subscription custom resource, setting the channel you want to use. From Camel K version 2 onward, we’re going to provide an installation channel for each major version we’re releasing (ie, stable-v2). This will simplify the upgrade process if you choose to perform an automatic upgrade.

Some Kubernetes clusters such as Openshift may let you to perform the same operation from a GUI as well. Refer to the cluster instruction to learn how to perform such action from user interface.

Installation via Kustomize

Kustomize provides a declarative approach to the configuration customization of a Camel-K installation. Kustomize works either with a standalone executable or as a built-in to kubectl. The /install directory provides a series of base and overlays configuration that you can use. You can create your own overlays or customize the one available in the repository to accommodate your need.

One liner operator installation procedure

If you don’t need to provide any configuration nor the registry (ie, in Openshift), you can apply this simple one liner:

$ kubectl apply -k github.com/apache/camel-k/install/overlays/openshift/descoped?ref=v2.4.0 --server-side

You can specify as ref parameter the version you’re willing to install (ie, v2.4.0). The command above will install a descoped (global) operator in the camel-k namespace.

if you’re not installing in Openshift you will need to manually change the IntegrationPlatform registry configuration as the operator won’t be able to find any valid registry address (see section below).

Custom configuration procedure

Most often you want to specify different parameters to configure the registry and other platform behaviors. In such case you can clone the project repository and use any of the overlays available, customizing to your needs.

# Clone the project repository
$ https://github.com/apache/camel-k.git
$ cd camel-k
# You can use any release tag (recommended as it is immutable) or branch
$ git checkout v2.4.0
$ cd install/overlays

In this directory you may find a series of default configuration for Kubernetes, Openshift and any other sensible profile. For Kubernetes, you can see we have prepared a descoped configuration and a namespaced which are installing the operator globally or in a specific namespace.

# Default, use this namespace (edit `kustomize.yaml` to change it)
$ kubectl create ns camel-k
$ kubectl apply -k kubernetes/descoped --server-side
# Change the registry address (edit the file for more configuration if required)
$ sed -i 's/address: .*/address: my-registry-host.io/' kubernetes/descoped/integration-platform.yaml
$ kubectl apply -k platform
you don’t need to set the platform if running on Openshift.

The above command will install a global Camel K operator in the camel-k namespace using the container registry you’ve provided. The server-side option is required in order to prevent some error while installing CRDs. We need to apply a separate platform configuration as Kustomize may not be yet aware of the CRDs if done in the same step.

Test your installation

Once you’ve completed any of the above installation procedure, you’ll be ready to run some integrations.

Special clusters requirements

Camel K installation is usually straightforward, but for certain cluster types you need to apply specific configuration settings before installing it. You need customized instructions for the following cluster types:

Fine Tuning

Camel K installation can be configured with certain special settings available for experienced users. You can manage resources such as limiting memory and CPU, provide a policy for Pod scheduling and Toleration. Please have a look at Camel K fine tuning to learn more about advanced configuration.