Skip to content

Commit 2bacdf8

Browse files
authored
Merge pull request kubernetes#88988 from smarterclayton/ensure_host_network_podips
kubelet: Also set PodIPs when assign a host network PodIP
2 parents a35f54e + c26653c commit 2bacdf8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pkg/kubelet/kubelet_pods.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1399,6 +1399,7 @@ func (kl *Kubelet) generateAPIPodStatus(pod *v1.Pod, podStatus *kubecontainer.Po
13991399
s.HostIP = hostIP.String()
14001400
if kubecontainer.IsHostNetworkPod(pod) && s.PodIP == "" {
14011401
s.PodIP = hostIP.String()
1402+
s.PodIPs = []v1.PodIP{{IP: s.PodIP}}
14021403
}
14031404
}
14041405
}

0 commit comments

Comments
 (0)