Chapter 3. Getting started with Kaoto


This section describes how to:

  • Setup a workspace in VS Code
  • Access the important commands to create your integration
  • Create your first Camel Route
  • Run your Camel Route locally
  • Get access to the source code of the Camel Route

3.1. Preparing the Workspace

Visual Studio Code requires you to create a workspace for your project to access the full functionality of the environment.

  1. If you haven’t done so yet, please open your Visual Studio Code instance. You can do that by finding the right launcher on your computer or by opening a command shell and executing code.
  2. This should leave you with a window like the one below. (In the picture below we selected already the Kaoto view - see the Kaoto Camel icon)

    empty vscode (1)
  3. Next we need to select our workspace folder which will store our project files.
  4. You can either click on the Open Folder button or you can also go to the File menu and select the entry Open Folder.
  5. In the following screen browse to the folder you would like to use and select it.

    open folder

3.2. Creating first Camel Route

  1. With the Kaoto view (the Kaoto Camel icon) on the left sidebar open you will see the Integration section on top.
  2. When moving the mouse to the right side of the Integrations headline you will see some small icons, one of the is a file with a plus sign.
  3. Click on it, select New Camel Route and follow the instructions to create your first Camel Route.
  4. Once done, the new file will be created and the Kaoto editor should appear as shown in the video below. If the editor does not appear, revisit the earlier steps to ensure you have followed all instructions correctly.

    create integration
  5. At this point, you have successfully created your first working Camel Route, which can be tested immediately.

    Note

    If the execution fails you should double check if you have installed the Camel CLI correctly. Follow the instructions outline in the section Camel CLI section.

  6. You should now see a similar screen like the one below.

    new route (1)

3.2.1. Launching the Camel Route

Testing your integration is easy and straight-forward.

  1. In the Integrations section hover over the file name of your integration and this will reveal some useful buttons. One of these buttons is a Camel icon with a green play button.
  2. Click it to launch your integration locally using Camel JBang.
  3. Please check the below video which will show you how to launch the integration and possible actions to interact with a running integration.

    launch integration
  4. As you can see in the video your integration is launched in Dev Mode and changes to the integration via the Kaoto editor or the source code will be reloaded whenever you save. This will help you prototyping faster.

3.2.2. Accessing the Source Code

You might wonder how the source of your new Camel Route looks like. While Kaoto tries relief users from the burden of working with the source code, we still allow access to it via the default Visual Studio Code Text Editor.

There are two ways to achieve this.

  1. The first one is to use the Open Source Code toggle button on the top right of the Kaoto editor. This is the most convenient way.
  2. The second one is to invoke the context menu on the tab with the file name of your integration and then use the Reopen Editor with item. Both ways are shown in the following video.

    show source
Back to top
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2025 Red Hat