<commit_before>= Kubernetes Components
//attributes written by hand, not generated
:doctitle: Kubernetes
:since: 2.17
:shortname: kubernetes
:artifactid: camel-kubernetes

*Since Camel {since}*

The Kubernetes components integrate your application with Kubernetes standalone or on top of Openshift.


== {doctitle} components

See the following for usage of each component:

indexDescriptionList::[attributes='group={doctitle}',descriptionformat=description]

== Installation

Maven users will need to add the following dependency to
their `pom.xml` for this component:
[source,xml]
------------------------------------------------------------
<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-kubernetes</artifactId>
    <version>x.x.x</version>
    <!-- use the same version as your Camel core version -->
</dependency>
------------------------------------------------------------


== Usage

=== Producer examples

Here we show some examples of producer using camel-kubernetes.

=== Create a pod

[source,java]
-------------------------------------------------------------
from("direct:createPod")
    .toF("kubernetes-pods://%s?oauthToken=%s&operation=createPod", host, authToken);
-------------------------------------------------------------

By using the KubernetesConstants.KUBERNETES_POD_SPEC header you can specify your PodSpec and pass it to this operation.

=== Delete a pod

[source,java]
-------------------------------------------------------------
from("direct:createPod")
    .toF("kubernetes-pods://%s?oauthToken=%s&operation=deletePod", host, authToken);
-------------------------------------------------------------

By using the KubernetesConstants.KUBERNETES_POD_NAME header you can specify your Pod name and pass it to this operation.

:camel-spring-boot-name: kubernetes
<commit_msg>CAMEL-18171: camel-kubernetes - Add secret/configmap property placeholder function.<commit_after>= Kubernetes Components
//attributes written by hand, not generated
:doctitle: Kubernetes
:since: 2.17
:shortname: kubernetes
:artifactid: camel-kubernetes

*Since Camel {since}*

The Kubernetes components integrate your application with Kubernetes standalone or on top of Openshift.


== {doctitle} components

See the following for usage of each component:

indexDescriptionList::[attributes='group={doctitle}',descriptionformat=description]

== Installation

Maven users will need to add the following dependency to
their `pom.xml` for this component:
[source,xml]
------------------------------------------------------------
<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-kubernetes</artifactId>
    <version>x.x.x</version>
    <!-- use the same version as your Camel core version -->
</dependency>
------------------------------------------------------------


== Usage

=== Producer examples

Here we show some examples of producer using camel-kubernetes.

=== Create a pod

[source,java]
-------------------------------------------------------------
from("direct:createPod")
    .toF("kubernetes-pods://%s?oauthToken=%s&operation=createPod", host, authToken);
-------------------------------------------------------------

By using the KubernetesConstants.KUBERNETES_POD_SPEC header you can specify your PodSpec and pass it to this operation.

=== Delete a pod

[source,java]
-------------------------------------------------------------
from("direct:createPod")
    .toF("kubernetes-pods://%s?oauthToken=%s&operation=deletePod", host, authToken);
-------------------------------------------------------------

By using the KubernetesConstants.KUBERNETES_POD_NAME header you can specify your Pod name and pass it to this operation.

== Using Kubernetes ConfigMaps and Secrets

The `camel-kubernetes` component also provides xref:manual:ROOT:using-propertyplaceholder.adoc[Property Placeholder]
functions that loads the property values from Kubernetes _ConfigMaps_ or _Secrets_.

For more information see xref:manual:ROOT:using-propertyplaceholder.adoc[Property Placeholder].

:camel-spring-boot-name: kubernetes

{'fraction_non_alphanumeric': 0.2607309296051018, 'fraction_numerical': 0.002698062300711307, 'mean_word_length': 2.2755020080321287, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7320814', 'n_tokens_mistral': 1041, 'n_tokens_neox': 967, 'n_words': 313}