What happened:
Specifying both -o=custom-columns and -L causes to kubectl causes the -L/--label-columns flag to be silently ignored (and there's no warning/error printed).
What you expected to happen: If the user is providing a flag, it should be used; otherwise, it should be failing.
How to reproduce it (as minimally and precisely as possible):
kubectl get ns -L kubernetes.io/metadata.name -o=custom-columns=NAME:.metadata.name
NAME
default
kube-node-lease
...
kubectl get ns -L kubernetes.io/metadata.name
NAME STATUS AGE METADATA.NAME
default Active 73d default
kube-node-lease Active 73d kube-node-lease
kube-public Active 73d kube-public
Anything else we need to know?: N/A
Environment:
- Kubernetes client and server versions (use
kubectl version): v1.35.0
- Cloud provider or hardware configuration: irrelevant
- OS (e.g:
cat /etc/os-release): macOS
What happened:
Specifying both
-o=custom-columnsand-Lcauses to kubectl causes the-L/--label-columnsflag to be silently ignored (and there's no warning/error printed).What you expected to happen: If the user is providing a flag, it should be used; otherwise, it should be failing.
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?: N/A
Environment:
kubectl version): v1.35.0cat /etc/os-release): macOS