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

Unable to get Pod IP from downward API when kubelet cannot contact API server #26590

Closed
derekparker opened this issue May 31, 2016 · 1 comment · Fixed by #27508
Closed

Unable to get Pod IP from downward API when kubelet cannot contact API server #26590

derekparker opened this issue May 31, 2016 · 1 comment · Fixed by #27508
Labels
sig/node Categorizes an issue or PR as relevant to SIG Node.

Comments

@derekparker
Copy link
Contributor

When a kubelet is not in standalone mode, and attempts to start a static pod with host networking, and the kubelet is unable to contact an API server, it is unable to get the host IP from the node information. Essentially, in Kubelet.GetNode it will return kl.initialNodeStatus if the kubelet is in standalone mode, if not it attempts to get that information from the CachedNodeInfo, which it appears is filled via API server watches. If the kubelet cannot contact the API server, that cache is never filled, so the kubelet cannot return node info, meaning podStatus.IP is never properly filled out.

@yujuhong
Copy link
Contributor

ref: #6558

derekparker pushed a commit to derekparker/kubernetes that referenced this issue May 31, 2016
Add initial node information to nodeInfo cache when registering with the
apiserver. This allows the kubelet to obtain node information in the
future, even if it is unable to contact the API server.

Fixes kubernetes#26590
derekparker pushed a commit to derekparker/kubernetes that referenced this issue May 31, 2016
Add initial node information to nodeInfo cache when registering with the
apiserver. This allows the kubelet to obtain node information in the
future, even if it is unable to contact the API server.

Fixes kubernetes#26590
@mikedanese mikedanese added the sig/node Categorizes an issue or PR as relevant to SIG Node. label Jun 1, 2016
k8s-github-robot pushed a commit that referenced this issue Jun 26, 2016
Automatic merge from submit-queue

Kubelet can retrieve host IP even when apiserver has not been contacted

fixes #26590, fixes #6558

Right now the kubelet expects to get the hostIP from the kubelet's local nodeInfo cache. However, this will be empty if there is no api-server (or the apiServer has not yet been contacted).

In the case of static pods, this change means the downward api can now be used to populate hostIP.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/node Categorizes an issue or PR as relevant to SIG Node.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants