-
k8s-merge-robot authored
Automatic merge from submit-queue kubectl: don't display an empty list when trying to get a single resource that isn't found Return immediately when attempting to get a singular resource that isn't found, so that we avoid printing out a List if the output format is something like json or yaml. Before: ``` $ kubectl get pod/foo -o yaml apiVersion: v1 items: [] kind: List metadata: {} pods "foo" not found ``` After: ``` $ kubectl get pod/foo -o yaml pods "foo" not found ``` Fixes #28243 @kubernetes/kubectl @kubernetes/rh-ux @smarterclayton @liggitt @deads2k @metral1e33d117