Chapter 93. Kubernetes

Kubernetes Component

Available as of Camel 2.17
The Kubernetes component is a component for integrating your application with Kubernetes standalone or on top of Openshift.
Maven users will need to add the following dependency to their pom.xml for this component:
<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>

URI format

kubernetes:masterUrl[?options]
You can append query options to the URI in the following format, ?option=value&option=value&...

Options

Name
Default Value
Description
masterUrl
null
Mandatory: The Kubernetes master URL
category
Mandatory: The category of producer/consumer. Possible values: namespaces, services, replicationControllers, pods, persistentVolumes, persistentVolumesClaims, secrets, resourcesQuota, serviceAccounts, nodes, builds, buildConfigs
username
The user name for login to Kubernetes cluster
password
The password for login to Kubernetes cluster
operation
Producer only: The operation that producer will do. Possible values:
listNamespaces, listNamespacesByLabels, getNamespace, createNamespace, deleteNamespace, listServices, listServicesByLabels, getService, createService, deleteService, listReplicationControllers, listReplicationControllersByLabels, getReplicationController, createReplicationController, deleteReplicationController, listPods, listPodsByLabels, getPod, createPod, deletePod, listPersistentVolumes, listPersistentVolumesByLabels, getPersistentVolume, listPersistentVolumesClaims, listPersistentVolumesClaimsByLabels, getPersistentVolumeClaim, createPersistentVolumeClaim, deletePersistentVolumeClaim, listSecrets, listSecretsByLabels, getSecret, createSecret, deleteSecret, listResourcesQuota, listResourcesQuotaByLabels, getResourceQuota, createResourceQuota, deleteResourceQuota, listServiceAccounts, listServiceAccountsByLabels, getServiceAccount, createServiceAccount, deleteServiceAccount, listNodes, listNodesByLabels, getNode, listBuilds, listBuildsByLabels, getBuild, listBuildConfigs, listBuildConfigsByLabels, getBuildConfig
apiVersion
The API Version to use
caCertFile
Path to CA cert file
caCertData
Path to CA cert data
clientCertFile
Path to client cert file
clientCertData
Path to client cert data
clientKeyAlgo
Key algorithm used by client
clientKeyFile
Path to client key file
clientKeyData
Path to client key data
clientKeyPassphrase
Client key passphrase
oauthToken
Authorization token
trustCerts
Define if the certs are trusted by default
namespaceName
Consumer only: The namespace the consumer will watch
poolSize
Consumer only: The Threadpool size for the Kubernetes consumer

Headers

Name
Type
Description
CamelKubernetesOperation
String
The Producer operation
CamelKubernetesNamespaceName
String
The Namespace name
CamelKubernetesNamespaceLabels
Map
The Namespace Labels
CamelKubernetesServiceLabels
Map
The Service labels
CamelKubernetesServiceName
String
The Service name
CamelKubernetesServiceSpec
io.fabric8.kubernetes.api.model.ServiceSpec
The Spec for a Service
CamelKubernetesReplicationControllersLabels
Map
Replication controller labels
CamelKubernetesReplicationControllerName
String
Replication controller name
CamelKubernetesReplicationControllerSpec
io.fabric8.kubernetes.api.model.ReplicationControllerSpec
The Spec for a Replication Controller
CamelKubernetesPodsLabels
Map
Pod labels
CamelKubernetesPodName
String
Pod name
CamelKubernetesPodSpec
io.fabric8.kubernetes.api.model.PodSpec
The Spec for a Pod
CamelKubernetesPersistentVolumesLabels
Map
Persistent Volume labels
CamelKubernetesPersistentVolumesName
String
Persistent Volume name
CamelKubernetesPersistentVolumesClaimsLabels
Map
Persistent Volume Claim labels
CamelKubernetesPersistentVolumesClaimsName
String
Persistent Volume Claim name
CamelKubernetesPersistentVolumesClaimsSpec
io.fabric8.kubernetes.api.model.PersistentVolumeClaimSpec
The Spec for a Persistent Volume claim
CamelKubernetesSecretsLabels
Map
Secret labels
CamelKubernetesSecretsName
String
Secret name
CamelKubernetesSecret
io.fabric8.kubernetes.api.model.Secret
A Secret Object
CamelKubernetesResourcesQuotaLabels
Map
Resource Quota labels
CamelKubernetesResourcesQuotaName
String
Resource Quota name
CamelKubernetesResourceQuotaSpec
io.fabric8.kubernetes.api.model.ResourceQuotaSpec
The Spec for a Resource Quota
CamelKubernetesServiceAccountsLabels
Map
Service Account labels
CamelKubernetesServiceAccountName
String
Service Account name
CamelKubernetesServiceAccount
io.fabric8.kubernetes.api.model.ServiceAccount
A Service Account object
CamelKubernetesNodesLabels
Map
Node labels
CamelKubernetesNodeName
String
Node name
CamelKubernetesBuildsLabels
Map
Openshift Build labels
CamelKubernetesBuildName
String
Openshift Build name
CamelKubernetesBuildConfigsLabels
Map
Openshift Build Config labels
CamelKubernetesBuildConfigName
String
Openshift Build Config name
CamelKubernetesEventAction
io.fabric8.kubernetes.client.Watcher.Action
Action watched by the consumer
CamelKubernetesEventTimestamp
String
Timestamp of the action watched by the consumer