Change:
} } func Test_v1_PodStatus_to_core_PodStatus(t *testing.T) { <del> // fail v1FailTestInputs := []v1.PodStatus{ </del> <ins> asymmetricInputs := []struct { name string in   v1.PodStatus out  core.PodStatus }{ </ins> { <del> PodIP: "1.1.2.1", // fail becaue PodIP != PodIPs[0] PodIPs: []v1.PodIP{ {IP: "1.1.1.1"}, {IP: "2.2.2.2"}, </del> <ins> name: "mismatched podIP", in: v1.PodStatus{ PodIP: "1.1.2.1", // Older field takes precedence for compatibility with patch by older clients PodIPs: []v1.PodIP{ {IP: "1.1.1.1"}, {IP: "2.2.2.2"}, }, }, out: core.PodStatus{ PodIPs: []core.PodIP{ {IP: "1.1.2.1"}, }, }, }, { name: "matching podIP", in: v1.PodStatus{ PodIP: "1.1.1.1", PodIPs: []v1.PodIP{ {IP: "1.1.1.1"}, {IP: "2.2.2.2"}, }, }, out: core.PodStatus{ PodIPs: []core.PodIP{ {IP: "1.1.1.1"}, {IP: "2.2.2.2"}, }, }, }, { name: "empty podIP", in: v1.PodStatus{ PodIP: "", PodIPs: []v1.PodIP{ {IP: "1.1.1.1"}, {IP: "2.2.2.2"}, }, }, out: core.PodStatus{ PodIPs: []core.PodIP{ {IP: "1.1.1.1"}, {IP: "2.2.2.2"}, }, </ins> }, }, } // success v1TestInputs := []v1.PodStatus{ // only Primary IP Provided

Discussion:
What happened: The cluster master in a Kubernetes v1.14.10 cluster was upgraded to V1.16.7. The process of upgrading nodes is under way and has been spread over a week so far. The cluster owner reported seeing a high percentage of pod status PATCH failures. The apiserver logs show errors like: The errors are all from the v1.14 nodes and have all been for pods associated with DaemonSets. We don't yet know why pods' IPs are changing, but it appears that pod status patches that include a changed result in an object where contains the old IP, and has the new IP. We believe this is because was introduced in Kubernetes v1.15 and the patch request from a v1.14 node results in both and being present in the result. If you aren't monitoring for request failures it may not obvious that any error is occurring: The pods continue to show their last successfully reported state. Deleting such pods, however, results in the pod being stuck in a state. We are only seeing this for DaemonSet pods - I suspect because whatever resulted in pod IPs changing also causes non-DaemonSet pods to be deleted and recreated. We have a number of cluster still on v1.14 that we expect to upgrade to v1.15 or v1.16. What you expected to happen: Kubernetes v1.14 nodes should be able to update pod status during the transition from v1.14 to v1.16 even if pod IPs change during that time. How to reproduce it (as minimally and precisely as possible): We have recreated this in the IBM Cloud Kubernetes Service by "reloading" nodes. The reload process leaves the Kubernetes node object in place, and essentially reloads the image with the proper kubeconfig to rejoin the cluster. The cluster I was debugging does not appear to have had nodes "reloaded" - something else is triggering the pod IP changes. Create a v1.14 cluster Deploy a DaemonSet (anything with pod networking should suffice) Upgrade cluster master to v1.16 Reload a v1.14 node. One the node is back up, shows the pod's network IP has changed. Kubelet and apiserver logs show the errors describe earlier. Anything else we need to know?

: Environment: Kubernetes version (use ): v1.14.x (nodes) and v1.16.7 (master) Cloud provider or hardware configuration: IBM Cloud Kubernetes Service OS (e.g: ): 18.04.4 LTS Kernel (e.g. ): 4.15.0-76-generic Install tools: Network plugin and version (if this is a network-related bug): Others:
/sig api-machinery
/sig network
cc
/priority critical-urgent if it's possible for podIPs to change and the server defaults to , then the API server has to treat the singular pod IP as authoritative if there's a mismatch or the patch case breaks
/triage unresolved Comment when the issue is assessed and confirmed. I am a bot run by vllry. ‍
/remove-sig api-machinery