// Module included in the following assemblies:
//
// assembly-kafka-bridge-tls.adoc

[id='proc-configuring-kafka-bridge-tls-{context}']
= Configuring TLS in Kafka Bridge

.Prerequisites

* An Kubernetes cluster
* A running Cluster Operator
* If they exist, the name of the `Secret` for the certificate used for TLS Server Authentication, and the key under which the certificate is stored in the `Secret`

.Procedure

. (Optional) If they do not already exist, prepare the TLS certificate used in authentication in a file and create a `Secret`.
+
NOTE: The secrets created by the Cluster Operator for Kafka cluster may be used directly.
+
[source,shell,subs=+quotes]
kubectl create secret generic _my-secret_ --from-file=_my-file.crt_

. Edit the `tls` property in the `KafkaBridge` resource.
For example:
+
[source,yaml,subs=attributes+]
----
apiVersion: {KafkaApiVersionPrev}
kind: KafkaBridge
metadata:
  name: my-bridge
spec:
  # ...
  tls:
	  trustedCertificates:
	  - secretName: my-cluster-cluster-cert
	    certificate: ca.crt
  # ...
----
+
. Create or update the resource.
+
[source,shell,subs=+quotes]
kubectl apply -f _your-file_
