Closed JMQuill closed 11 months ago
This issue is currently awaiting triage.
SIG CLI takes a lead on issue triage for this repo, but any Kubernetes member can accept issues by applying the triage/accepted
label.
The triage/accepted
label can be added by org members by writing /triage accepted
in a comment.
PVs are not scoped to any namespace. For ref check here
To see more about k8s resources are/aren't in a namespace, use following comments
resources in namespace kubectl api-resources --namespaced=true
Resources not in namespace kubectl api-resources --namespaced=false
@tamilselvan1102 I understand they aren't namespaced, which is why i think an unknown flag
error should be thrown when interacting with them using -n
kubectl get command can return multiple resources with a mixture of namespaced and non-namespaced ones. That's why, not returning unknown flag for -n
is the expected behavior even when the resource is non-namespaced resource to let kubectl get pv,pvc -n test
return something.
I understand the inconvenience in here but I doubt that we can change this behavior.
I think, we can close this one because it is duplicate as well as designed by that way;
/close
@ardaguclu: Closing this issue.
What happened: When running a command using the namespace flag such as
kubectl get pv -n {namespace}
all PVs are returned from the clusterWhat you expected to happen: An error such as
Unknown flag -n for resource type PersistentVolume
How to reproduce it (as minimally and precisely as possible):
kubectl get pv -n {namespace}
Anything else we need to know?:
Environment:
kubectl version
):Client Version: version.Info{Major:"1", Minor:"27", GitVersion:"v1.27.2", GitCommit:"7f6f68fdabc4df88cfea2dcf9a19b2b830f1e647", GitTreeState:"clean", BuildDate:"2023-05-17T14:20:07Z", GoVersion:"go1.20.4", Compiler:"gc", Platform:"darwin/arm64"}cat /etc/os-release
): Mac OS 14.1 (23B74)