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

Add certificate based authentication to localkube/minikube. #48

Merged
merged 10 commits into from
May 9, 2016

Conversation

dlorenc
Copy link
Contributor

@dlorenc dlorenc commented May 6, 2016

This PR uses easyrsa to generate certificates on the host, and configures localkube to use them. Currently we just print out the steps to configure kubectl to use these certificates, but I'll automate this in a follow-up PR.

cc @ethernetdan @luxas

@dlorenc
Copy link
Contributor Author

dlorenc commented May 6, 2016

Addresses #10 #11

fi
# Fetch easy-rsa.
sudo mkdir -p /srv/kubernetes/certs && sudo chmod -R 777 /srv
if [ ! -e easy-rsa.tar.gz ]; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about creating the certs with go instead?
Maybe that's easier...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried a few different ways, using https://github.com/SvenDowideit/generate_cert/blob/master/generate_cert.go but was unable to get anything working in pure go :(

@luxas
Copy link
Member

luxas commented May 9, 2016

What about something like redspread/localkube#50?

@dlorenc
Copy link
Contributor Author

dlorenc commented May 9, 2016

What about something like redspread/localkube#50?

I might be missing something, but that isn't quite the same. That PR doesn't setup any client certificates for actually accessing the API server, which is where I ran into trouble.

@luxas
Copy link
Member

luxas commented May 9, 2016

Ah, I was thinking about the service accounts only.
Fair enough, let's do that in another PR.

There are some small things that could be improved here, but I think that's better for follow-ups
LGTM

@dlorenc dlorenc merged commit 488e4dc into kubernetes:master May 9, 2016
@luxas
Copy link
Member

luxas commented May 9, 2016

FYI, this broke localkube when running outside of the VM
We have to get it generated in golang :)

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

Successfully merging this pull request may close these issues.

3 participants