Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>vscode-camelkNew to Visual Studio Code? Get it now.

vscode-camelk

Preview

Camel Tooling

|
52 installs
| (0) | Free
VS Code extensions to support Camel-K functionality
This extension is now unpublished from Marketplace. You can choose to uninstall it.

GitHub tag Build Status License Gitter

Visual Studio extension to support Camel-K

This extension is a work-in-progress to explore what options we can add to VS Code to support Camel-K.

Note that it currently requires that both Camel-K and Minikube be installed and available on the system path.

To install Minikube and Camel-K, see Installing MiniKube and Camel-K.

Kubernetes tools in VS Code

The Kubernetes Tools extension from Microsoft offers a number of tools we can use with Minikube and Camel-K. With a local Minikube instance running, you can see your local clusters appear in the Kubernetes Activity view.

Kubernetes Activity with Camel-K

With any node appearing in a Minikube cluster, you can easily follow the logs by right-clicking and selecting "Follow Logs" in the context menu.

Kubernetes View pop-up menu

This opens a log for that pod in a new Terminal window.

Kubernetes View operator log

Starting new Camel-K integrations

Once your Camel-K/Minikube environment is running and the vscode-camelk extension is installed, you can easily start a new Camel-K integration from a Java (.java), Camel XML (Spring DSL) (.xml), or Groovy (*.groovy) file. (JavaScript and Kotlin files may be supported in the future.) To do this, right-click on the Java, XML, or Groovy file, and select "Start Camel-K Integration."

With Language Support for Apache Camel installed, you also get LSP support for Camel XML and Java routes:

Hello XML

LSP support is also coming for other file types (such as Groovy). And we will investigate adding run support for *.class files.

'Start Camel-K Integration' menu results

If Camel-K (Kamel) is in the system path, we can simply call the 'kamel' utility with appropriate options to run a particular file when the user wishes. For example, if I have a simple workspace with a Groovy file...

Run Menu

That launches my 'kamel' process from an XML file in the directory of the file (i.e. kamel run --dev "filename").

If I open the Camel-K Output channel (View->Output, select "Camel-K" from the Output dropdown list) and I can see the output:

Run Output

Stopping running Camel-K integrations

In addition, there is a menu to stop a running integration. To do this, right-click on the Java, XML, or Groovy file, and select "Stop Camel-K Integration."

Stop menu

"Stop Camel-K Integration" essentially calls kamel delete '${filename}' to stop the running integration in the system.

Camel-K Integrations view

The Camel-K Integrations view offers a list of the "integrations" registered with the current Camel-K context. If you right-click on a running integration, you can "Remove" an integration to stop them in the system.

Camel-K integrations view Remove

The view has a "Refresh" button that can be used to manually trigger a refresh of the list, but when you add/remove file-based integrations in the Explorer view, it should refresh automatically.

Camel-K integrations view Refresh

Known Issues

Here's the current list of issues we're working to resolve. If you find a new issue, please create a new issue report in GitHub!

  • Do not pollute all Groovy files with Camel-K Issue #7 - this is also a problem for XML and Java files at this time
  • Use Kubernetes rest api instead of kubectl calls Issue #14
  • Contact us
  • Jobs
  • Privacy
  • Terms of use
  • Trademarks
© 2019 Microsoft