Skip to content
This repository has been archived by the owner on May 10, 2019. It is now read-only.

Kuberos running in another Kubernetes cluster #42

Open
Miouge1 opened this issue Jun 25, 2018 · 7 comments
Open

Kuberos running in another Kubernetes cluster #42

Miouge1 opened this issue Jun 25, 2018 · 7 comments

Comments

@Miouge1
Copy link
Contributor

Miouge1 commented Jun 25, 2018

Hi,

I run a single Kuberos instance for several Kubernetes clusters:

  • production cluster (has kuberos)
  • staging cluster (no kuberos, but uses the same OIDC config as production cluster)

Both clusters have letsencrypt CA, so I don't prefer to not include any certificate-authority-data.

The thing is that by default Kuberos tries to be smart and adds the /var/run/secrets/kubernetes.io/serviceaccount as a certificate-authority-data but that's not really what I'm after.

As a work around I have added the letsencrypt ca in certificate-authority-data is there a better way to address this? Maybe a flag --guess-ca?

@negz
Copy link
Owner

negz commented Jun 28, 2018

This sounds like a bit of a tricky one. As you say, there's two ways to load CA data at the moment: either by reading them from the kubeconfig template file, or (in single cluster deployments) loading them from the service account.

I have to admit I'm a little unfamiliar with Let's Encrypt in practice. Could you explain a little more around why you don't want to use the certificate-authority-data field of the Kuberos template?

@Miouge1
Copy link
Contributor Author

Miouge1 commented Jun 28, 2018

The thing is that letsencrypt certs are already trusted by the system (ie it's not self signed, example: https://letsencrypt.org/) so you don't need to give the certificate-authority-data as it's already somewhere in /etc/ssl/.

@Bekt
Copy link

Bekt commented Jul 11, 2018

We're on a internal network and connect to our cluster with insecure-skip-tls-verify: true. When this option is specified, certificate-authority-data is not allowed. It would be nice not to generate certificate-authority-data by default.

error: specifying a root certificates file with the insecure flag is not allowed

@Miouge1
Copy link
Contributor Author

Miouge1 commented Jul 11, 2018

@negz what do you think about a boolean flag to control that?

@ripta
Copy link
Contributor

ripta commented Jul 16, 2018

@Miouge1 - What happens when you don't mount in a service account by modifying kuberos's pod spec to have automountServiceAccountToken: false (doc)?

Doing so removes the default service account from being mounted into kuberos at all, and the original intention of #36 was to have kuberos leave certificate-authority-data alone.

@negz
Copy link
Owner

negz commented Jul 16, 2018

Hi all,

Just wanted to apologise that I haven't been very active in this conversation. It sounds like a problem worth solving, but I want to think a little more about how we solve it. Unfortunately I haven't had a lot of time for Kuberos these last few weeks, but I hope my schedule will clear up soon.

@Bekt
Copy link

Bekt commented Jul 17, 2018

@ripta thanks a lot for the context! That solved our issue. Adding that to the pod spec no longer auto-generates certificate-authority-data.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants