Chapter 2. Installing Camel K
This chapter explains how to install Red Hat Integration - Camel K and OpenShift Serverless on OpenShift, and how to install the required Camel K and OpenShift client tools in your development environment.
2.1. Installing Camel K from the OpenShift OperatorHub
You can install the Red Hat Integration - Camel K Operator on your OpenShift cluster from the OperatorHub. The OperatorHub is available from the OpenShift Container Platform web console and provides an interface for cluster administrators to discover and install Operators. For more details on the OperatorHub, see the OpenShift documentation.
Prerequisites
- You must have cluster administrator access to an OpenShift 4.6 cluster
You do not need to create a pull secret when installing Camel K from the OpenShift OperatorHub. The Camel K Operator automatically reuses the OpenShift cluster-level authentication to pull the Camel K image from registry.redhat.io
.
Procedure
- In the OpenShift Container Platform web console, log in using an account with cluster administrator privileges.
Create a new OpenShift project:
- In the left navigation menu, click Home > Project > Create Project.
-
Enter a project name, for example,
my-camel-k-project
, and click Create.
- In the left navigation menu, click Operators > OperatorHub.
-
In the Filter by keyword text box, enter
Camel K
to find the Red Hat Integration - Camel K Operator. - Read the information about the Operator, and click Install to display the Operator subscription page.
Select the following subscription settings:
- Update Channel > techpreview
- Installation Mode > A specific namespace on the cluster > my-camel-k-project
Approval Strategy > Automatic
NoteThe Installation mode > All namespaces on the cluster and Approval Strategy > Manual settings are also available if required by your environment.
- Click Install, and wait a few moments until the Camel K Operator is ready for use.
Additional resources
2.2. Installing OpenShift Serverless from the OperatorHub
You can install the OpenShift Serverless Operator on your OpenShift cluster from the OperatorHub. The OperatorHub is available from the OpenShift Container Platform web console and provides an interface for cluster administrators to discover and install Operators. For more details on the OperatorHub, see the OpenShift documentation.
The OpenShift Serverless Operator supports both Knative Serving and Knative Eventing features. For more details, see Getting started with OpenShift Serverless.
Prerequisites
- You must have cluster administrator access to an OpenShift 4.6 cluster
Procedure
- In the OpenShift Container Platform web console, log in using an account with cluster administrator privileges.
- In the left navigation menu, click Operators > OperatorHub.
-
In the Filter by keyword text box, enter
Serverless
to find the OpenShift Serverless Operator. - Read the information about the Operator, and click Install to display the Operator subscription page.
Select the default subscription settings:
- Update Channel > Select the channel that matches your OpenShift version, for example, 4.6
- Installation Mode > All namespaces on the cluster
Approval Strategy > Automatic
NoteThe Approval Strategy > Manual setting is also available if required by your environment.
- Click Install, and wait a few moments until the Operator is ready for use.
Install the required Knative components using the steps in the OpenShift documentation:
Additional resources
- Installing OpenShift Serverless in the OpenShift documentation
2.3. Installing the Camel K and OpenShift command line tools
Camel K and OpenShift provide command line tools to deploy and manage your integrations in the cloud. This section explains how to install the following Command Line Interface (CLI) tools:
-
kamel
- Camel K CLI -
oc
- OpenShift Container Platform CLI -
kn
- OpenShift Serverless CLI
These command line tools are all available on Linux, Windows, and Mac.
Prerequisites
You must have access to an OpenShift cluster on which the Camel K Operator and OpenShift Serverless Operator are installed:
Procedure
- In the OpenShift Container Platform web console, log in using an account with developer or administrator privileges.
- Click the help icon in the toolbar, and select Command Line Tools.
-
Download and extract the
oc
- OpenShift CLI archive if this tool is not already installed. For more details, see the OpenShift CLI documentation. -
Download and extract the
kn
- OpenShift Serverless CLI archive if this tool is not already installed. For more details, see the OpenShift Serverless CLI documentation. -
Download and extract the
kamel
- Camel K CLI archive to install. -
Add the
kamel
binary file to your system path. For example, on Linux, you can putkamel
in/usr/bin
. Log into your OpenShift cluster using the
oc
client tool, for example:$ oc login --token=my-token --server=https://my-cluster.example.com:6443
Enter the following command to verify the installation of the
kamel
client tool:$ kamel --help
Additional resources