Skip to content
This repository has been archived by the owner on Sep 18, 2020. It is now read-only.

app-admin/kubelet-wrapper: Specify hosts-entry to mount hosts file #2839

Merged
merged 1 commit into from
Oct 20, 2017

Conversation

weikinhuang
Copy link
Contributor

@weikinhuang weikinhuang commented Oct 20, 2017

This fixes an issue with the v1.8.x hyperkube images switching to debian base and missing an internal hosts file. Which causes lookups to localhost to fail.

Refs issue: kubernetes-retired/bootkube#740

@weikinhuang
Copy link
Contributor Author

Quoting @euank from mentioned issue:

I suspect the root cause of that hosts file difference is this kubernetes change: kubernetes/kubernetes#48535

Rather than bindmounting through /etc/hosts, the rkt option --hosts-entry=host should copy over the hosts entry you have in /etc/hosts.

We'd be happy to take a PR against the kubelet-wrapper in the coreos-overlay repo if you'd like to (do note you'll need to bump the ebuild revision too if you do make such a PR).

Other fixes could be for the upstream hyperkube image to continue including a proper /etc/hosts file, or for the kubelet to only use 127.0.0.1 instead of relying on localhost to resolve to it.

I might make that last change when I get time.

I do think that this is not a bootkube issue but rather a kubernetes+hyperkube or container-linux+kubelet-wrapper issue.

Copy link
Contributor

@euank euank left a comment

Choose a reason for hiding this comment

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

0.0.2-r1 -> 0.0.3 would be a more typical version bump.

Once that rename is done, LGTM

@weikinhuang
Copy link
Contributor Author

done

@dghubble
Copy link
Member

Works for me to address port-forward being broken when running on GCE.

There are more details in the issue @weikinhuang linked, but whether port-forward works depends on whether kubelet localhost can be resolved, which varies depending on the network / platform. Some of them mask this issue. Fix LGTM

@euank euank merged commit 7349cbd into coreos:master Oct 20, 2017
@weikinhuang
Copy link
Contributor Author

thanks!

@euank
Copy link
Contributor

euank commented Oct 20, 2017

Thank you.

This should end up in the next set of releases; in the meanwhile overriding the option in the unit will be easier, but at least it can just be a temporary hack.

@dghubble
Copy link
Member

Yeah, there are several places we can patch this in the mean time. On it.

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

Successfully merging this pull request may close these issues.

3 participants