-
Notifications
You must be signed in to change notification settings - Fork 40.1k
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
When using host network, the pod IP is always empty in downward API #24576
Comments
Why not just set @yujuhong WDYT? |
Do you mean "set the podStatus.IP to apiPodStatus.IP before SyncPod?" IMO, we should call the block to determine the IP only once. Why don't we populate set the |
We also use However, I think it would be good to have IP always correctly set in |
I must admit, I have been thinking about this in the background since @yifan-gu created this issue, and the discussion hasn't added up for me. I finally sat down and spent some time getting my numerous fixes for podIP via downward API back into my brain, and now the problem seems very obvious to me. So, after some thought, I believe that for the docker runtime, the problem is that
|
@pmorie Today BTW, I think we have a similar issue here for rkt. |
@Random-Liu @yifan-gu I think we should think about adding the plbuming. I have not had a good experience storingthis information in multiple places :) |
The code was written so that it'd work in the absence of the pod specs (which we don't always have).
I agree with you, but adding the dependency today without some form of checkpointing (e.g., container annotations) of the pod specs may be problematic now. We can revisit this after we store pod specs in the annotations. What do you think? :) |
I'm cool with revisiting @yujuhong but if we do that we should drop this to p2 |
Automatic merge from submit-queue Fix downward api for pod using host network. Fixes #24576 @yujuhong @yifan-gu I still can't find a cleaner way to fix this, so send this for discussion. <!-- Reviewable:start --> --- This change is [<img src="http://reviewable.k8s.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](http://reviewable.k8s.io/reviews/kubernetes/kubernetes/24633) <!-- Reviewable:end -->
Reopen the issue to capture #24633 (comment) |
@yifan-gu Is this fixed? |
hi, also interested in knowing if this is fixed. |
@bassam @xiang90 I don't think anyone is tacking on this one right now since people are mostly working on the new CRI implementation for different runtimes. cc @Random-Liu @yujuhong |
@yifan-gu thanks. it also looks like there might be a specific issue with rkt here. Looking at https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/rkt/rkt.go#L804 and |
currently broken due to kubernetes/kubernetes#24576 and this one rkt/rkt#3181
@bassam Thanks for the heads up. I will take a look to see if we can quickly work around this. |
Issues go stale after 30d of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
…herry-pick-24564-to-release-4.4 [release-4.4] Bug 1804514: kubelet: Make default journal format precise Origin-commit: cc614cecc12ec55e2c111d66daa2c130346c9053
Turns our that when running a container in host network, its
podStatus *kubecontainer.PodStatus
that is passed to dockertools.SyncPod() will always contain empty IP, as a result, thePodIP
environment becomes empty.Maybe we want to use the
apiPodStatus
instead ofpodStatus
in this case to determine the pod IP ? Since the apiPodStatus has the valid PodIP, which is populated by kubelet when the container runs in host network.Or just populate the podIP with hostIP in
dockertools.syncPod
when the container runs on host network.Ref #22666
cc @aaronlevy @kubernetes/sig-node @pmorie
The text was updated successfully, but these errors were encountered: