diff --git a/pkg/kubectl/describe.go b/pkg/kubectl/describe.go index 8e8ae09a76d..f1e0b823f6b 100644 --- a/pkg/kubectl/describe.go +++ b/pkg/kubectl/describe.go @@ -222,13 +222,14 @@ func getPodStatusForReplicationController(c client.PodInterface, controller *api return } for _, pod := range rcPods.Items { - if pod.CurrentState.Status == api.PodRunning { + switch pod.CurrentState.Status { + case api.PodRunning: running++ - } else if pod.CurrentState.Status == api.PodPending { + case api.PodPending: waiting++ - } else if pod.CurrentState.Status == api.PodSucceeded { + case api.PodSucceeded: succeeded++ - } else if pod.CurrentState.Status == api.PodFailed { + case api.PodFailed: failed++ } }