Red Hat Camel K is no longer supported.
As of June 30, 2025, Red Hat build of Camel K has reached End of Life. The suggested replacements is Red Hat build of Apache Camel. For details about moving, see the Camel K to Camel Quarkus migration guide.25.3. 使用方法
本节论述了如何使用 ftp-source
。
25.3.1. Knative Source 复制链接链接已复制到粘贴板!
您可以通过将 ftp-source
Kamelet 绑定到 Knative 对象来使用 ftp-source Kamelet 作为 Knative 源。
ftp-source-binding.yaml
25.3.1.1. 前提条件 复制链接链接已复制到粘贴板!
确保您已将 "Red Hat Integration - Camel K" 安装到您连接的 OpenShift 集群中。
25.3.1.2. 使用集群 CLI 的步骤 复制链接链接已复制到粘贴板!
-
将
ftp-source-binding.yaml
文件保存到本地驱动器中,然后根据您的配置需要对其进行编辑。 使用以下命令运行源:
oc apply -f ftp-source-binding.yaml
oc apply -f ftp-source-binding.yaml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
25.3.1.3. 使用 Kamel CLI 的步骤 复制链接链接已复制到粘贴板!
使用以下命令配置和运行源:
kamel bind ftp-source -p "source.connectionHost=The Connection Host" -p "source.directoryName=The Directory Name" -p "source.password=The Password" -p "source.username=The Username" channel:mychannel
kamel bind ftp-source -p "source.connectionHost=The Connection Host" -p "source.directoryName=The Directory Name" -p "source.password=The Password" -p "source.username=The Username" channel:mychannel
此命令在集群的当前命名空间中创建 KameletBinding。
25.3.2. Kafka 源 复制链接链接已复制到粘贴板!
您可以通过将 ftp-source
Kamelet 绑定到 Kafka 主题来使用 ftp-source Kamelet 作为 Kafka 源。
ftp-source-binding.yaml
25.3.2.1. 先决条件 复制链接链接已复制到粘贴板!
确保您已在 OpenShift 集群中安装了 AMQ Streams Operator,并在当前命名空间中创建一个名为 my-topic
的主题。另外,请确保将 "Red Hat Integration - Camel K" 安装到您连接的 OpenShift 集群中。
25.3.2.2. 使用集群 CLI 的步骤 复制链接链接已复制到粘贴板!
-
将
ftp-source-binding.yaml
文件保存到本地驱动器中,然后根据您的配置需要对其进行编辑。 使用以下命令运行源:
oc apply -f ftp-source-binding.yaml
oc apply -f ftp-source-binding.yaml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
25.3.2.3. 使用 Kamel CLI 的步骤 复制链接链接已复制到粘贴板!
使用以下命令配置和运行源:
kamel bind ftp-source -p "source.connectionHost=The Connection Host" -p "source.directoryName=The Directory Name" -p "source.password=The Password" -p "source.username=The Username" kafka.strimzi.io/v1beta1:KafkaTopic:my-topic
kamel bind ftp-source -p "source.connectionHost=The Connection Host" -p "source.directoryName=The Directory Name" -p "source.password=The Password" -p "source.username=The Username" kafka.strimzi.io/v1beta1:KafkaTopic:my-topic
此命令在集群的当前命名空间中创建 KameletBinding。