Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example configs for using external Certificates #638

Closed
rambo45 opened this issue Jan 3, 2018 · 9 comments
Closed

Example configs for using external Certificates #638

rambo45 opened this issue Jan 3, 2018 · 9 comments
Assignees
Labels
area/UX kind/bug Categorizes issue or PR as related to a bug. kind/documentation Categorizes issue or PR as related to documentation. lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Milestone

Comments

@rambo45
Copy link

rambo45 commented Jan 3, 2018

When using Kubeadm generated CA certs, all kubectl commands fail due to unknown signing CA. Documentation for using External CA is not clear, please provide examples

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 4, 2018
@timothysc
Copy link
Member

/assign @liztio

/cc @stealthybox

@timothysc timothysc added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Apr 6, 2018
@timothysc timothysc added this to the v1.11 milestone Apr 6, 2018
@timothysc timothysc added the kind/documentation Categorizes issue or PR as related to documentation. label Apr 6, 2018
@liztio
Copy link

liztio commented Apr 25, 2018

/active

@liztio liztio added the lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. label Apr 25, 2018
@liztio
Copy link

liztio commented Apr 26, 2018

There's a bunch of different parts to fixing this.

  1. Better documentation around what certs are required for kubeadm to work without a CA. Jason's got a good gist on this
  2. Document pitfalls of doing this (cert rotation etc)
  3. Better error messages when not all those certs are present. Currently we just fall back on "no ca key found" when we miss anything
  4. Specify how to create a kubeconfig from your own CA and the server's credentials (possibly using kubectl)

@liztio
Copy link

liztio commented Apr 27, 2018

Spoke to @Bradamant3, we both agree a list of certs required and the hierarchy needed would be useful to more than just kubeadm. I'm going to make that list, which will also function as documentation for kubeadm, commit it upstream, and then link from our kubeadm docs.

@liztio
Copy link

liztio commented Apr 30, 2018

initial PR for certificate documentation added to k8s/website

@liztio
Copy link

liztio commented May 2, 2018

Working on part 3. Copied from #sig-cluster-lifecycle:

I'm working on the external CA logic. Right now the logic is:

  1. Check if all required external certs are presents. If they are not, continue:
  2. For every CA pair, see if the pair already exists. If only the key or only the cert exist, error. if both exist, continue: if neither exist, create them and continue:
  3. Generate certificates using those CAs
    this means, for example, if you send an external CA, but not all the required client/server certificates, a relatively obtuse error message occurs
    failure loading ca certificate: couldn't load the private key file /etc/kubernetes/pki/ca.key: open /etc/kubernetes/pki/ca.key: no such file or directory
    I'm trying to figure out what is least surprising to do here, because the current thing is pretty surprising / unhelpful

@timothysc timothysc modified the milestones: v1.11, v1.12 May 15, 2018
@luxas
Copy link
Member

luxas commented May 18, 2018

@timothysc I think we should classify this as a bug (well it is), and target v1.11

@luxas luxas added kind/bug Categorizes issue or PR as related to a bug. area/UX and removed lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. labels May 18, 2018
@luxas luxas modified the milestones: v1.12, v1.11 May 18, 2018
@ghost
Copy link

ghost commented May 24, 2018

Hi,

Per questions from #sig-cluster-lifecycle, I wonder if there's a 1-on-1 mapping reference documentation for certificate and keys generated from kubeadm alpha phase certs all versus Kelsey Hightower Kubernetes the hard way, as a smoke test.

Currently the use case is, to verify an engineer handcrafted Kubernetes cluster, we have to handcraft another one to verify each step correctness. Maybe there's some way could verify this full automatically, we are willing to know. The ideal goal is, the certs and keys generated from Kelsey's tutorial shall be interchangeable with those from kubeadm, in both ways.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/UX kind/bug Categorizes issue or PR as related to a bug. kind/documentation Categorizes issue or PR as related to documentation. lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

No branches or pull requests

8 participants