Chapter 7. Camel K command reference
This chapter provides reference details on the Camel K command line interface (CLI), and provides examples of using the kamel
command. This chapter also provides reference details on Camel K modeline options that you can specify in a Camel K integration source file, which are executed at runtime.
This chapter includes the following sections:
7.1. Camel K command line
The Camel K CLI provides the kamel
command as the main entry point for running Camel K integrations on OpenShift.
7.1.1. Supported commands
Note the following key:
Symbol | Description |
---|---|
✔ | Supported |
❌ | Unsupported or not yet supported |
Name | Supported | Description | Example |
---|---|---|---|
| ✔ | Bind Kubernetes resources such as Kamelets, in an integration flow, to Knative channels, Kafka topics, or any other endpoint. |
|
| ❌ | Generate completion scripts. |
|
| ❌ | Debug a remote integration using a local debugger. |
|
| ✔ | Delete an integration deployed on OpenShift. |
|
| ✔ |
Get detailed information on a Camel K resource. This includes an |
|
| ✔ | Get the status of integrations deployed on OpenShift. |
|
| ✔ |
Get the full list of available commands. You can enter |
|
| ✔ | Initialize an empty Camel K file implemented in Java or YAML. |
|
| ❌ | Install Camel K on an OpenShift cluster. Note: It is recommended that you use the OpenShift Camel K Operator to install and uninstall Camel K. |
|
| ❌ | Configure an Integration Kit. |
|
| ❌ | Perform integration actions locally given a set of input integration files. |
|
| ✔ | Print the logs of a running integration. |
|
| ✔ | Clear the state of one or more integrations causing a rebuild. |
|
| ❌ | Reset the current Camel K installation. |
|
| ✔ | Run an integration on OpenShift. |
|
| ❌ | Uninstall Camel K from an OpenShift cluster. Note: It is recommended that you use the OpenShift Camel K Operator to install and uninstall Camel K. |
|
| ✔ | Display Camel-K client version. |
|
Additional resources
7.2. Camel K modeline options
You can use the Camel K modeline to enter configuration options in a Camel K integration source file, which are executed at runtime, for example, using kamel run MyIntegration.java
. For more details, see Running Camel K integrations using modeline.
All options that are available for the kamel run
command, you can specify as modeline options.
The following table describes some of the most commonly-used modeline options.
Option | Description |
---|---|
| Add a build-time property or build-time properties file.
Syntax: |
| Add a runtime configuration from a Configmap, Secret, or file
Syntax:
-
- |
| Include an external library (for example, a Maven dependency)
Example: |
|
Set an environment variable in the integration container. For example, |
|
Add a label for the integration. For example, |
|
Add an integration name. For example, |
|
Add an OpenAPI v2 specification. For example, |
|
Set the Camel K trait profile used for deployment. For example, |
| Add a runtime property or a runtime properties file.
Syntax: |
| Add a run-time resource from a ConfigMap, Secret or file
Syntax:
-
- |
|
Configure a Camel K feature or core capability in a trait. For example, |