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.6.2.7. Service Trait
Service trait 会公开与 Service 资源的集成,以便在同一命名空间中的其他应用程序(或集成)可以访问它。
如果集成依赖于可公开 HTTP 端点的 Camel 组件,它默认启用。
此特征在以下配置集中提供: Kubernetes、OpenShift。
6.2.7.1. Configuration 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
运行任何与 CLI 的集成时,可以指定特征属性:
kamel run --trait service.[key]=[value] --trait service.[key2]=[value2] Integration.java
$ kamel run --trait service.[key]=[value] --trait service.[key2]=[value2] Integration.java
可用的配置选项如下:
属性 | 类型 | 描述 |
---|---|---|
|
| 可用于启用或禁用特征。所有特征共享此通用属性。 |
|
| 如果需要创建服务,从代码中自动检测。 |
|
|
启用 Service 以作为 NodePort (默认 |