mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-02-02 23:30:03 +00:00
Automatic merge from submit-queue (batch tested with PRs 51750, 53195, 53384, 53410). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. outputs `<none>` for colums not found **What this PR does / why we need it**: outputs `<none>` for columns specified by `-o custom-columns` but not found in object currently kubectl outputs an error of "xxx is not found" when a column is not in the returned json (omitted because of empty value or no such field in the object type at all). This PR suppress this error but outputs `<none>` at that field. This makes it convenient to output the objects details, especially when getting objects of different type in one command. example: ``` $ kubectl get deploy,rs,po -o custom-columns=NAMESPACE:.metadata.namespace,NAME:.metadata.name,REPLICAS:.status.replicas NAMESPACE NAME REPLICAS default deck 1 default deck-433074128 1 default deck-433074128-vxcg9 <none> ``` **Special notes for your reviewer**: **Release note**: ```release-note outputs `<none>` for columns specified by `-o custom-columns` but not found in object ``` @kubernetes/kubectl-reviewers