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).

Installation via Kamel CLI

To start using Camel K you need the "kamel" CLI tool, that can be used to both configure the cluster and run integrations. Look into the release page for the latest version of the camel-k-client tool for your specific platform.

Download and deflate the archive. It contains a small binary file named kamel that you should put into your system path. For example, if you’re using Linux, you can put kamel in /usr/bin.

Once you have put the kamel CLI in the path, log into your cluster using the standard oc (OpenShift) or kubectl (Kubernetes) client tool and execute the following command to install Camel K:

$ kamel install --olm=false
if you’re not using Minikube or Openshift, make sure to have a container registry available and use also --registry parameter.

This will configure the cluster with the Camel K custom resource definitions and install the operator on the current namespace with the default settings.

Custom Resource Definitions (CRD) are cluster-wide objects and you need admin rights to install them. Fortunately, this operation can be done once per cluster. So, if the kamel install operation fails, you’ll be asked to repeat it when logged as admin. For CRC, this means executing oc login -u system:admin then kamel install --cluster-setup only for the first-time installation.

Installation via Kustomize

Camel K can be installed using Kustomize, providing an interface for configuring more advanced features.

First you need to get the kustomize files

# Clone the project repository
$ https://github.com/apache/camel-k.git
$ cd camel-k
# You can use any release branch or skip this step to use it the last code on `main`
$ git checkout release-a.b.x
$ cd install

Next you need to apply configuration at cluster level

$ kubectl kustomize --load-restrictor LoadRestrictionsNone setup-cluster/ | kubectl create -f -

Then the roles and privileges needs to be added

$ kubectl apply -k setup
$ kubectl apply -k pkg/resources/config/rbac/namespaced
# For openshift
$ kubectl apply -k pkg/resources/config/rbac/openshift
$ kubectl apply -k pkg/resources/config/rbac/openshift/namespaced

Should you want your operator operator to watch all namespaces (global operator), you will replace pkg/resources/config/rbac/namespaced by pkg/resources/config/rbac/descoped and pkg/resources/config/rbac/openshift/namespaced by pkg/resources/config/rbac/openshift/descoped.

Finally the operator can be deployed

$ kubectl apply -k operator
$ kubectl apply -k platform

By default the operator is configured to get the registry information from a Configmap expected the namespace kube-public like this example:

apiVersion: v1
kind: ConfigMap
metadata:
  name: local-registry-hosting
  namespace: kube-public
data:
  localRegistryHosting.v1: |
    hostFromContainerRuntime: "registry:5000"
you probably want to edit the configuration. Please, do any change right after cloning the repository. Be careful to avoid making any modification in the install/config folder.

More information on the Kustomize Camel K installation procedure 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 (or CRC) 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.

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 my-camel-k camel-k/camel-k

More instructions on the Camel K Helm page.

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:

Minishift is no longer supported since Camel K 1.5.0. You can use CRC for a local OpenShift cluster.

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.