Red Hat Camel K is deprecated
Red Hat Camel K is deprecated and the End of Life date for this product is June 30, 2025. For help migrating to the current go-to solution, Red Hat build of Apache Camel, see the Migration Guide.3.3. 使用方法
ここでは、aws-kinesis-sink
の使用方法について説明します。
3.3.1. Knative Sink
aws-kinesis-sink
Kamelet を Knative オブジェクトにバインドすることで、Knative のシンクとして使用することができます。
aws-kinesis-sink-binding.yaml
apiVersion: camel.apache.org/v1alpha1 kind: KameletBinding metadata: name: aws-kinesis-sink-binding spec: source: ref: kind: Channel apiVersion: messaging.knative.dev/v1 name: mychannel sink: ref: kind: Kamelet apiVersion: camel.apache.org/v1alpha1 name: aws-kinesis-sink properties: accessKey: "The Access Key" region: "eu-west-1" secretKey: "The Secret Key" stream: "The Stream Name"
apiVersion: camel.apache.org/v1alpha1
kind: KameletBinding
metadata:
name: aws-kinesis-sink-binding
spec:
source:
ref:
kind: Channel
apiVersion: messaging.knative.dev/v1
name: mychannel
sink:
ref:
kind: Kamelet
apiVersion: camel.apache.org/v1alpha1
name: aws-kinesis-sink
properties:
accessKey: "The Access Key"
region: "eu-west-1"
secretKey: "The Secret Key"
stream: "The Stream Name"
3.3.1.1. 前提条件
接続先の OpenShift クラスターにRed Hat Integration - Camel Kがインストールされていることを確認します。
3.3.1.2. クラスター CLI の使用手順
-
aws-kinesis-sink-binding.yaml
ファイルをローカルドライブに保存し、設定に合わせて編集します。 以下のコマンドを使用してシンクを実行します。
Copy to Clipboard Copied! Toggle word wrap Toggle overflow oc apply -f aws-kinesis-sink-binding.yaml
oc apply -f aws-kinesis-sink-binding.yaml
3.3.1.3. Kamel CLI を使用するための手順
以下のコマンドを使用してシンクを設定し、実行します。
kamel bind channel:mychannel aws-kinesis-sink -p "sink.accessKey=The Access Key" -p "sink.region=eu-west-1" -p "sink.secretKey=The Secret Key" -p "sink.stream=The Stream Name"
kamel bind channel:mychannel aws-kinesis-sink -p "sink.accessKey=The Access Key" -p "sink.region=eu-west-1" -p "sink.secretKey=The Secret Key" -p "sink.stream=The Stream Name"
このコマンドは、クラスターの現在の namespace に KameletBinding を作成します。