Visual Studio extension to support Camel-K
This extension offers basic integration with Camel-K (https://github.com/apache/camel-k) on two fronts.
First, Camel-K runs with a combination of the "kamel" runtime and either Minishift, Minikube, or GKE running locally on the development system. We utilize the "kamel" and "kubectl" executables to manage a few basic tasks listed further down.
Second, we also have the capability of using Restful calls to a Proxy when provided the correct URL and port combination (defaulting to http://localhost:8000). The proxy offers the same functionality as if we were using the command-line executables.
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.
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.
This opens a log for that pod in a new Terminal window.
Starting new Camel-K integrations
With Language Support for Apache Camel installed, you also get LSP support for Camel XML and Java routes:
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...
That launches my 'kamel' process from an XML file in the directory of the file (i.e.
There are two types of "output channels" providing details for the extension.
Stopping running Camel-K integrations
Once an integration is running, it may be stopped in the "Camel-K Integrations" view by right-clicking on the integration and selecting "Remove Camel-K Integration." Stopping an integration removes its associated output channel.
"Stop Camel-K Integration" essentially calls
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 or "Follow" the log to show the running log for your integration in a new Output channel.
Following a log opens a new Output channel named for the running Kubernetes pod where the integration is running. It updates as new data is added to it:
In addition, 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.
Note: Refreshing the view sometimes is delayed as we wait for pods to start. You may need to give it a few seconds. If nothing happens, the Refresh button is a good option.
Camel-K Extension Settings
To access the new extension settings, go to File->Preferences->Settings, then select "Extensions" and finally "Camel-K Integration Settings."
Starting a local Kubernetes proxy
(Only available with the Minikube executable installed, but useful for local development.)
We have created a new command available in the command palette (Ctrl+Shift+P or F1) called "Camel-K: Start the kubectl proxy server." This will start a new Kubernetes proxy using the Minikube executable ('kubectl proxy --port=8000) and refreshes the Camel-K Integrations view immediately. This command creates a local proxy at http://localhost:8000, which is the default value for Proxy URL in the extension settings.
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!