이 콘텐츠는 선택한 언어로 제공되지 않습니다.

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.

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.

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

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

© 2024 Red Hat, Inc.