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

In 1.3, kubelet cloud-provider setting is not respected when --cloud-provider="" #28231

Closed
emaildanwilson opened this issue Jun 29, 2016 · 8 comments · Fixed by #28258
Closed
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. sig/node Categorizes an issue or PR as relevant to SIG Node.

Comments

@emaildanwilson
Copy link
Contributor

It appears that the kubelet will detect and use the cloud provider as detected by cadvisor thus overriding the cloud provider passed in at runtime: https://github.com/kubernetes/kubernetes/blob/release-1.3/pkg/kubelet/kubelet.go#L1117. This will break our private cloud configuration where we do not use our cloud provider's load balancing and instead use our own load balancing tier. In my opinion, the cloud provider specified at kubelet runtime should be respected for the node.

Am I reading this correctly?
Any thoughts on how to handle this properly?

Thank you!

@yujuhong
Copy link
Contributor

If you specify any cloud provider through flags, it will be used by kubelet (see https://github.com/kubernetes/kubernetes/blob/release-1.3/pkg/kubelet/kubelet.go#L1068). It's only when you don't specify any cloud provider that kubelet will detect the cloud provider from the machine info, as described by the comment.

        // If no cloud provider is defined - use the one detected by cadvisor

@emaildanwilson
Copy link
Contributor Author

emaildanwilson commented Jun 29, 2016

that's exactly my situation, I want to run in our private cloud environment without any of the cloud integration. If I specify cloud-provider="" at runtime it will get overridden.

@yujuhong
Copy link
Contributor

that's exactly my situation, I want to run in our private cloud environment without any of the cloud integration. If I specify cloud-provider="" at runtime it will get overridden.

Ah I see. I guess specifying an empty string is the same as not specifying any cloud provider.

This auto-detection feature was introduced by #21373
/cc the author and reviewer to see if this is an intended behavior: @enoodle @vishh

@yujuhong yujuhong added the sig/node Categorizes an issue or PR as relevant to SIG Node. label Jun 29, 2016
@emaildanwilson emaildanwilson changed the title In 1.3, kubelet cloud provider setting may not be respected In 1.3, kubelet cloud-provider setting is not be respected when --cloud-provider="" Jun 29, 2016
@emaildanwilson emaildanwilson changed the title In 1.3, kubelet cloud-provider setting is not be respected when --cloud-provider="" In 1.3, kubelet cloud-provider setting is not respected when --cloud-provider="" Jun 29, 2016
@vishh
Copy link
Contributor

vishh commented Jun 29, 2016

@emaildanwilson Legitimate concern. I'm posting a fix. Do you consider this to be a regression or are you just getting started with k8s.

@enoodle
Copy link

enoodle commented Jun 29, 2016

@yujuhong @vishh I am sorry, This was not the original intention. We can keep the auto detection with a flag, or make a flag to ask kubelet not to do it.
Unless there is a way to see if the variable was assigned to that I missed.
I can post a fix tomorrow if it won't exit by then.

@emaildanwilson
Copy link
Contributor Author

@vishh Thank you. We're running on 1.2.4 and won't be running on 1.3 for a few months yet anyways and was just testing to look for future issues when I found this.

@yujuhong yujuhong added the kind/bug Categorizes issue or PR as related to a bug. label Jun 29, 2016
@yujuhong
Copy link
Contributor

@vishh I assigned this issue to you since you are working on a fix, and I can't assign this to @enoodle anyway :-)

@dchen1107
Copy link
Member

@emaildanwilson Thanks for testing our 1.3 release candidate, and reporting this regression to us. We are including the fix to 1.3.

k8s-github-robot pushed a commit that referenced this issue Jun 30, 2016
Automatic merge from submit-queue

[kubelet] Allow opting out of automatic cloud provider detection in kubelet. By default kubelet will auto-detect cloud providers

fixes #28231
eparis pushed a commit to eparis/kubernetes that referenced this issue Jun 30, 2016
Automatic merge from submit-queue

[kubelet] Allow opting out of automatic cloud provider detection in kubelet. By default kubelet will auto-detect cloud providers

fixes kubernetes#28231
(cherry picked from commit ab37fbf)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. sig/node Categorizes an issue or PR as relevant to SIG Node.
Projects
None yet
5 participants