此内容没有您所选择的语言版本。

Chapter 9. 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:

9.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. This section provides details on the most commonly used kamel commands.

Expand
Table 9.1. kamel commands
NameDescriptionExample

help

Get the full list of available commands. You can enter --help as a parameter to each command for more details.

  • kamel help
  • kamel run --help

init

Initialize an empty Camel K file implemented in Java, XML, or YAML.

kamel init MyIntegration.java

run

Run an integration on OpenShift.

kamel run MyIntegration.java

debug

Debug a remote integration using a local debugger.

kamel debug my-integration

get

Get integrations deployed on OpenShift.

kamel get

describe

Get detailed information on a Camel K resource. This includes an integration, kit, or platform.

kamel describe integration my-integration

log

Print the logs of a running integration.

kamel log my-integration

delete

Delete an integration deployed on OpenShift.

kamel delete my-integration

9.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 Section 3.7, “Running Camel K integrations using modeline”.

This section provides reference details about the most commonly used modeline options.

Expand
Table 9.2. Camel K modeline options
OptionDescription

dependency

Add an external library to be included in the integration. For example, for Maven, use dependency=mvn:org.my/app:1.0, or for GitHub, use dependency=github:my-account:camel-k-example-project:master.

env

Set an environment variable in the integration container. For example, env=MY_ENV_VAR=my-value.

label

Add a label for the integration. For example, label=my.company=hello.

name

Add an integration name. For example, name=my-integration.

open-api

Add an OpenAPI v2 specification. For example, open-api=path/to/my-hello-api.json.

profile

Set the Camel K trait profile used for deployment. For example, openshift.

property

Add a integration property. For example, property=my.message="Hola Mundo".

property-file

Bind a property file to the integration. For example, property-file=my-integration.properties.

resource

Add an external resource. For example, resource=path/to/my-hello.txt.

trait

Configure a Camel K feature or core capability in a trait. For example, trait=cron.enabled=true.

返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat