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

Start using status.hostIP in k8s daemonsets examples #184

Open
klingerf opened this issue Oct 10, 2017 · 3 comments
Open

Start using status.hostIP in k8s daemonsets examples #184

klingerf opened this issue Oct 10, 2017 · 3 comments

Comments

@klingerf
Copy link
Member

First reported by @dlaidlaw.

As of Kubernetes 1.7 (kubernetes/kubernetes#42717), we can now retrieve the host IP directly from the downward API via the status.hostIP field, without needing to rely on the spec.nodeName field, which isn't addressable in all Kubernetes environments (including minikube -- #130).

We should update our example configs in this repo to start using status.hostIP instead of spec.nodeName, but we also need to figure out a way to ensure backwards compatibility with older versions of Kubernetes, either by versioning the config files or doing something smarter with environment variable fallback.

@zyf0330
Copy link

zyf0330 commented Mar 28, 2018

I have a question, how does status.hostIP choose if there are several internal ips?

@dlaidlaw
Copy link

@zyf0330 I believe this done in the cloud-provider code. Each cloud provider (aws, gce, etc) is responsible for providing the instance metadata. In the case of AWS, the the address would come from the aws instance metadata.

@zyf0330
Copy link

zyf0330 commented Mar 28, 2018 via email

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

No branches or pull requests

3 participants