Trusting a custom root CA when using the teleport-kube-agent
chart
#12129
webvictim
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In #11295 we added support for
tls.existingSecretName
to theteleport-cluster
chart, which allows you to more easily set up a Teleport cluster in Kubernetes using an existing TLS certificate/key pair - one signed by a private root CA, for example. This functionality also allows you to provide the public part of the root CA to Teleport so it can build a full root -> intermediate -> cert trust chain itself.This PR has been backported (#11922) and should be released along with Teleport 9.0.5 when the chart is next published.
If you do this, however, you will also need to configure any agents using the
teleport-kube-agent
chart to trust the same root CA. Otherwise, you may get an error like this:2022-04-20T20:06:51Z ERRO [PROC:1] App failed to establish connection to cluster: Post "https://teleport.example.com:443/v1/webapi/host/credentials": x509: certificate signed by unknown authority, invalid character '<' looking for beginning of value. service/connect.go:82
How to add the root CA
Here's how you can configure the
teleport-kube-agent
chart to also validate against a root CA and join a cluster:teleport-kube-agent
:extraVolumes
,extraVolumeMounts
andextraEnv
values to your existing chart values (see https://goteleport.com/docs/kubernetes-access/getting-started/agent for details):After this, install the chart as normal with something like
helm install -n teleport-kube-agent teleport-kube-agent teleport/teleport-kube-agent -f values.yaml
and your CA should then be trusted.Note on multiple CAs
You can add multiple CAs to the
ca.pem
to build a chain if needed. The easiest way to do this is to use thecat
command to join multiple certificates into one:After this you can create the secret as described above.
Beta Was this translation helpful? Give feedback.
All reactions