---
title: "Retrieve Kafka Certificates"
description: "Retrieve and save Exoscale DBaaS Kafka cluster CA, access certificate and key using CLI commands for secure connection setup."
url: https://community.exoscale.com/product/dbaas/service-specific/kafka/how-to/ca-retrieve/
product: "Kafka"
section: product
last_updated: 2026-06-03
---
> For AI agents: the documentation index is at https://community.exoscale.com/llms.txt. Every page is available as markdown at `<page URL>index.md` or with `Accept: text/markdown`.

# Retrieve Kafka Certificates

To retrieve the CA for a newly created cluster, run the following command:

```bash 
exo dbaas ca-certificate > ca.pem
```

The file `ca.pem` now contains the CA for the Exoscale DBaaS.

To retrieve the access certificate and key, we need to use the output templates
of the CLI.

```bash 
exo dbaas show test-kafka -z de-muc-1 --output-template '{{.Kafka.ConnectionInfo.AccessCert}}'
```

Output:

```bash 
-----BEGIN CERTIFICATE-----
MIIEPDCCAqSgAwIBAgIUf+hoGaT3XjwEbguv9LYqNiVUw54wDQYJKoZIhvcNAQEM
BQAwOjE4MDYGA1UEAwwvYjJmODcwNmUtMDBmNi00M2MzLTkyMjktYTU5ZTYzODhm
ZGQwIFByb2plY3QgQ0EwHhcNMjExMTAxMTUxMTM2WhcNMjQwMTMwMTUxMTM2WjA7
....
....
qI70kNpCdbiqVf9EXvlmEkGFbKkR5rGW+QvdGwXTLBs=
-----END CERTIFICATE-----
```

For further handling, we will put the certificate and key into files. First for the certificate:

```bash 
exo dbaas show test-kafka -z de-muc-1 --output-template '{{.Kafka.ConnectionInfo.AccessCert}}' > test-kafka_cert.pem
```

And then for the key:

```bash 
exo dbaas show test-kafka -z de-muc-1 --output-template '{{.Kafka.ConnectionInfo.AccessKey}}' > test-kafka_key.pem
```
