Open GrigoriyMikhalkin opened 1 month ago
This issue is currently awaiting triage.
If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted
label and provide further guidance.
The triage/accepted
label can be added by org members by writing /triage accepted
in a comment.
I think the error is because each resource type is prepended to the resource name, so the resource names end up being [pods/deployment.apps/coredns deployments/deployment.apps/coredns]
which has more than 2 parts when split by the /
. kubectl get pods,deployments coredns -n kube-system
gives the desired outcome.
@alex-kattathra-johnson Yes.
The question is should the behavior be changed or should it return more clear error message to the user in that case.
/sig cli
/transfer kubectl
What is the error message in here, is this?
get pods,deployments deployment.apps/coredns -n kube-system
@ardaguclu The error is error: arguments in resource/name form may not have more than one slash
. Fixed original post. Thanks for noticing!
Command is invalid and the actual command should be kubectl get deployment.apps/coredns -n kube-system
.
I see that error message is not very descriptive. However, I don't think, we can (would want to) change it, because there are many other components relying on this functionality and whatever the message we change to, it will not be descriptive for another component. I'd prefer closing this.
What happened?
When command
kubectl get pods,deployments deployment.apps/coredns -n kube-system
is executed it returns the error:What did you expect to happen?
kubectl get
should returndeployment.apps/coredns
resource.How can we reproduce it (as minimally and precisely as possible)?
Create local cluster with kind/minikube/etc:
By default it should have
coredns
deployment, try to run:Anything else we need to know?
It's not necessary should be treated as a bug but maybe as a bad error description. Up to discussion.
Kubernetes version
Cloud provider
OS version
Install tools
Container runtime (CRI) and version (if applicable)
Related plugins (CNI, CSI, ...) and versions (if applicable)