> For the complete documentation index, see [llms.txt](https://docs.terrakube.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.terrakube.io/2.34.0/getting-started/deployment/custom-ca-certs.md).

# Custom CA Certs

Use this when Terrakube must trust a private certificate authority, for example for an internal Git server, an internal registry, a TLS-inspecting proxy, or a database or Redis with a private certificate. A missing CA shows up as `x509: certificate signed by unknown authority`.

### With the Helm chart

Put the PEM certificates under `security.caCerts` in your values file:

```yaml
security:
  caCerts:
    internal-root-ca.pem: |
      -----BEGIN CERTIFICATE-----
      MIIDZTCCA...
      -----END CERTIFICATE-----
    proxy-ca.pem: |
      -----BEGIN CERTIFICATE-----
      MIIDZTCCA...
      -----END CERTIFICATE-----
```

Then `helm upgrade`. The chart stores the certificates in a Kubernetes secret (`terrakube-ca-secrets`), mounts them into the **API, registry and executor** pods, and sets `SERVICE_BINDING_ROOT`, so there is nothing else to configure. This needs chart 4.2.6 or later. Restart the pods if they do not roll on their own.

To confirm, check the start-up log of a pod for a line like:

```
Added 2 additional CA certificate(s) to system truststore
```

### How it works

The Terrakube images are built with Cloud Native Buildpacks. At start-up the buildpack reads certificates from `$SERVICE_BINDING_ROOT/ca-certificates`, which must contain your `.pem` files and a file named `type` whose content is `ca-certificates`, and adds them to the JVM and system trust stores. The chart creates the `type` file for you. Without the chart, mount the same folder yourself at `/mnt/platform/bindings/ca-certificates` and set `SERVICE_BINDING_ROOT=/mnt/platform/bindings`.

### At build time

If you build your own images, put the certificates in `bindings/ca-certificates` of a checkout of the [terrakube repository](https://github.com/terrakube-io/terrakube) and run `scripts/build/terrakubeBuild.sh` from the root.

### Related

* A corporate proxy: [Proxy Configuration](/2.34.0/getting-started/deployment/proxy-configuration.md).
* Redis with a private or managed certificate: [External Redis](/2.34.0/getting-started/deployment/external-redis.md).
* Symptoms and fixes: [Troubleshooting](/2.34.0/reference/troubleshooting.md#a-step-failed-with-x509-certificate-signed-by-unknown-authority).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.terrakube.io/2.34.0/getting-started/deployment/custom-ca-certs.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
