Luis Alberto Mira
4 min readOct 3, 2020

--

INSTALLING APACHE CAMEL-K ON IBM KUBERNETES SERVICE (IKS)

This Document is built with the collaboration Juan José Pérez B

Introduction

In this tutorial we are going to install the Apache Camel-k over an IKS (IBM CLOUD Kubernetes Service) the commands used here to deploy the infraestructure are Linux

What is Camel-k?

Apache Camel K is a lightweight an integration framework built from Apache Camel that runs natively on Kubernetes and is specifically designed for serverless and microservice architectures.

Users of Camel K can instantly run integration code written in Camel DSL on their preferred cloud (Kubernetes or OpenShift).

Prerequisites

Tools are already installed

kubectl: Kubernetes Command Line Tool

Helm (Optional): Package management for Kubernetes

How to create a Free Account on IBM Cloud

For this step, you can refer to the official link of IBM Cloud above

You need to upgrade your account to receive USD$200 in order to create the basic Kubernetes cluster.

Install IBM Cloud Command Line Tool

Use the steps on this page to install the latest IBM Cloud CLI based on your OS:

In our case we are going to install with:

curl -fsSL https://clis.cloud.ibm.com/install/linux |sh

If you need install on Windows you need download the installer from here

Create a Kubernetes Cluster

After to create your account, you need log in to this page https://cloud.ibm.com/login and put your credentials first

When you login, you click in the top left menu and select the option kubernetes > clusters

Now you can see the next screen and you can select the option create cluster

In select a plan you can choose the option free and select the name for your cluster and click in create to build the cluster

Finally, after 10 minutes approximately the cluster is Ok

Accessing your cluster

  1. Log in to your IBM Cloud account. Include the — sso option if you have a federated ID.

ibmcloud login

2. Set the Kubernetes context to your cluster for this terminal session.

ibmcloud ks cluster config --cluster cluster1

3. Verify that you can connect to your cluster.

kubectl config current-context

Now, you can run kubectl commands to manage your cluster workloads in IBM Cloud

Create container Image Registry

Create the container registry in order to use in the next steps.

ibmcloud cr namespace-add camel-registry

Download and Install Camel-k Cli

Download and uncompress the last release of camel-k command line tool. It contains a small binary file named kamel that you should put into your system path. in Linux, you can put kamel in /usr/bin.

Install Camel-k

There are two ways to install Camel-k using the kamel emmbeded installation or helm hub

NOTE: You need to follow only one of the following procedures

Procedure 1.

Install Camel-k Cli on the cluster

kamel install --olm=false --maven-repository=https://repository.apache.org/content/repositories/snapshots@id=apache-snapshopt@snapshots --registry='us.icr.io/camel-registry' --wait

Procedure 2.

Install Camel-K with helm

helm repo add camel-k https://apache.github.io/camel-k/charts

helm instal --generate-name --set platform.cluster=kubernetes camel-k/camel-k

Check the Installation

Create a Camel-k file Dummy integration

vim hello.groovy

from(‘timer:tick?period=3000’)

.setBody().constant(‘Hello world from Camel K’)

.to(‘log:info’)

Execute the command:

kamel run hello.groove

Check the Camel integration

To check the created integration put the command:

kamel get

A new Pod will be spin up

Uninstall Camel K

--

--