You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
kubectl get nodes -show-labels json parse error #94030
What happened:
I forgot to use a double dash for the flag: --show-labels
kubectl get nodes -show-labels
error: couldn't get version/kind; json parse error: json: cannot unmarshal string into Go value of type struct { APIVersion string "json:\"apiVersion,omitempty\""; Kind string "json:\"kind,omitempty\"" }
What you expected to happen:
I expected to see an error such as Error: unknown flag -show-labels instead of a JSON parse error.
How to reproduce it (as minimally and precisely as possible):
Run kubectl get nodes -show-labels
Hey! This is intended behavior since it matches the -s flag with how-labels as the value. The docs says; -s, --server='': The address and port of the Kubernetes API server. You can find these global flags by using kubectl options.
Hey! This is intended behavior since it matches the -s flag with how-labels as the value. The docs says; -s, --server='': The address and port of the Kubernetes API server. You can find these global flags by using kubectl options.
/close
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
Activity
corburn commentedon Aug 15, 2020
/sig cli
odinuge commentedon Aug 16, 2020
Hey! This is intended behavior since it matches the
-sflag withhow-labelsas the value. The docs says;-s, --server='': The address and port of the Kubernetes API server. You can find these global flags by usingkubectl options./close
k8s-ci-robot commentedon Aug 16, 2020
@odinuge: Closing this issue.
Details
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.