-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Configure the kubelet to use HTTPS #6243
Conversation
t.Errorf("unexpected error: %v", err) | ||
} | ||
components := util.StringSet{} | ||
for _, s := range status { | ||
if s.Err != "nil" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By the way, this test was passing before when it should have been failing because we weren't checking for error in the sub-components. The test would pass after 30 seconds (hitting the url fetch timeout) because it had a result for each component -- but the result was a failure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch
7c7a011
to
89cd1ba
Compare
provided on the command line, generate self-signed certs.
89cd1ba
to
dd9ec46
Compare
tlsOptions := &kubelet.TLSOptions{ | ||
Config: &tls.Config{ | ||
// Change default from SSLv3 to TLSv1.0 (because of POODLE vulnerability). | ||
MinVersion: tls.VersionTLS10, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That'll just request, but not require (or validate) client certs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right. I didn't want to also require the master to send client certs as part of the same change. This could probably be left out since we aren't doing anything with certs yet, but I don't think it hurts to leave it in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, just noting it
IIUC, this PR is additionally changing the master to use TLS when validating the scheduler and the controller-manager? Do mention that in the commit description somewhere. |
@erictune The second commit's description is "Configure the master to connect to the kubelet using HTTPS.". If you approve this change, I plan to squash the commits into one and that will certainly be part of the commit log. I had to change the master to use TLS in a couple of places when contacting the Kubelet. The more difficult one was in the /validate endpoint on the master, which previously was using a raw http.Client to connect to each listed endpoint to fetch it's status. It now uses TLS when connecting to Kubelets and a regular http client when connecting to other URLs. |
Okay, was confused, your explanation helped. Thanks. |
Code LGTM. |
Wondering whether ContainerVM users may be depending on ability to connect to Kubelet over HTTP. Suggest flag to disable it this case. |
It should be the same for all cloud providers: kubelet uses TLS. As for upgrades, we will need to think about how we manage the certs (provided by startup scripts or generated on demand). |
If someone upgrades their kubelets from pre-this-PR to post-this-PR, then they just lose the ability to /validate the kubelets, which presumably they aren't using after the cluster is setup? |
Until we add client cert checking, you can still connect over HTTPS if you do |
LGTM |
Configure the kubelet to use HTTPS
@jseaidou @gkeramidas FYI |
I believe this PR broke
|
I just chatted with @vishh and it definitely broke heapster's ability to collect stats from the kubelet. Rolling it back.... |
As of now, the master connects to the kubelet without verifying the certificate presented by the kubelet.
This is step 1 from #3168.