Apache Camel K Installation Process In a nutshell

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

Camel K installation can be done easily on different containers. this post is mainly focusing on the Minikube running within the Docker platform. Besides the docker, VirtualBox is also another alternate option to install with Minikube.

Prerequisites:

    1. Docker Engine/ VirtualBox
    2. Minikube
    3. Kamel Command Line Interface (Camel CLI)

 Installation Steps:

1. Docker Desktop/VirtualBox:

a.     We can choose either Docker or Virtual Box as a containerized platform to host the Minikube.  

b.     I will be using Docker for this installation. I have downloaded the latest version of Docker engine for Windows platform from the docker website https://www.docker.com/products/docker-desktop

c.     Alternatively, you can use VirtualBox as well for the installation.

2. Minikube:

Minikube is a tool that lets you run your Camel K integrations in a Containerized environment. It also acts as a single node Kubernetes cluster on your personal computer. Minikube supports different operating systems including Windows/Linux/macOS.

Now lets start with Minikube installation with Docker as a driver.

Below is the official website for Minikube – Make sure your system has met the hardware configurations mentioned as per the website.

Minikube Website: https://minikube.sigs.k8s.io/docs/start/

URL to download the Minikube: https://storage.googleapis.com/minikube/releases/latest/minikube-installer.exe

a.    This is as normal as any software installation. Follow the instructions and Complete the installation by clicking next next and finish.

b.     Run: To start the Minikube, execute the below command from your command prompt.

C:\>minikube start --driver=docker

Note: --driver=docker is an optional however it is recommended to mention --driver name in the command if your machine has both the VirtualBox and Docker running.

c.     Post the start command, open your docker engine to see the Minikube is up and running. Please find the screenshot below for your reference.

e.     By default, the Minikube has generated a port number that keep running the container. 

f.      To play with some basic commands on minikube please refer the section “Manage your cluster” on the minikube documentation page: https://minikube.sigs.k8s.io/docs/start/

g.     Execute the below command to enable addons on your Minikube.

C:\>minikube addons enable registry

The next step in this process is to install Camel CLI on your Machine.

3. Kamel CLI Tool:

           You need the "kamel" CLI tool to start with the installation.  Kamel CLI is used to configure the Camel Operator and also to run your integrations. Download and extract the contents from the downloaded archive. It contains a small binary file named kamel that you should put into your system path in environment variables.

The Kamel CLI tool URL to download :  https://github.com/apache/camel-k/releases

Run the below command to install the Kamel to the default namespace in Minikube.

C:\> Kamel Install

OLM is not available in the cluster. Fallback to regular installation.
Camel K installed in namespace default.

Lsting existing namespaces on Minikube.
C:\>kubectl get namespace
NAME                   STATUS   AGE
default                Active   6h32m
kube-node-lease        Active   6h32m
kube-public            Active   6h32m
kube-system            Active   6h32m  

Below init command is used to create a Sample DSL Java class which generates default Router section.

C:\>Kamel init Sample.Java

To run the Camel Integration from the command line use run command.  

C:\>Kamel run Sample.java --dev

Install Kamel on a custom Namespace 

In case you have created a custom namespace and you need the Camel installation to be on the Custom namespace.Then, make sure to set the custom namespace as a current and active namespace.

Follow the below steps for creating custom namespace and make it active.

C:\>kubectl create namespace gtata

namespace/gtata created

C:\>kubectl config set-context --current --namespace=sandbox

Context "minikube" modified.

C:\>kubectl get pods

No resources found in sandbox namespace.

C:\>kubectl get namespace

NAME                   STATUS   AGE
default                Active   24h
kube-node-lease        Active   24h
kube-public            Active   24h
kube-system            Active   24h
kubernetes-dashboard   Active   24h
gtata                  Active   2m8s
sandbox                Active   4m38s

You are all set with Camel K Installation and your system is ready for running Integrations.

Comments

Popular posts from this blog

Common Errors - Invoking Oracle Stored procedure from MuleSoft 4.0 - DateTime formats and Default values

JDev/ADF -- Programmatically Deleting selected rows in ADF Table