diff --git a/pkg/kubectl/rolling_updater.go b/pkg/kubectl/rolling_updater.go index 3c50e3921ed..94379cd1342 100644 --- a/pkg/kubectl/rolling_updater.go +++ b/pkg/kubectl/rolling_updater.go @@ -749,7 +749,9 @@ func AddDeploymentKeyToReplicationController(oldRc *api.ReplicationController, r // we've finished re-adopting existing pods to the rc. selector = labels.SelectorFromSet(selectorCopy) options = metav1.ListOptions{LabelSelector: selector.String()} - podList, err = podClient.Pods(namespace).List(options) + if podList, err = podClient.Pods(namespace).List(options); err != nil { + return nil, err + } for ix := range podList.Items { pod := &podList.Items[ix] if value, found := pod.Labels[deploymentKey]; !found || value != deploymentValue {