Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting PVs #73

Open
scaleoutsean opened this issue Mar 26, 2021 · 0 comments
Open

Getting PVs #73

scaleoutsean opened this issue Mar 26, 2021 · 0 comments

Comments

@scaleoutsean
Copy link

scaleoutsean commented Mar 26, 2021

Shouldn't PVs not require a namespace parameter?

> Get-KubeResource -Kind PersistentVolume  
Get-KubeResource: Resource API for v1/PersistentVolume only supports listing resources within a specific namespace.

> Get-KubeResource -Kind PersistentVolume -Namespace default
Get-KubeResource: Resource API for v1/PersistentVolume only supports listing resources within a specific namespace.

> # other resources do work (PVC happens to require a NS so I provided it)

> Get-KubeResource -Kind PersistentVolumeClaim -Namespace default

Spec       : KubeClient.Models.PersistentVolumeClaimSpecV1
Status     : KubeClient.Models.PersistentVolumeClaimStatusV1
Metadata   : KubeClient.Models.ObjectMetaV1
Kind       : PersistentVolumeClaim
ApiVersion : v1
Name       : postgresql-data
Namespace  : default
Age        : 1.17:22:39.0442324

On the same host, using Bash:

$ kubectl get pv
NAME                                       CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS     CLAIM                     STORAGECLASS   REASON   AGE
pvc-18c58c66-c11b-4d97-a72e-2503093e7498   1Gi        RWO            Retain           Bound      default/postgresql-data   basic                   41h
pvc-4184017b-18e1-4917-8bd5-dfbe9b0fbf6f   1Gi        RWO            Retain           Released   default/postgresql-data   basic                   43h

$ kubectl version
Client Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.4", GitCommit:"e87da0bd6e03ec3fea7933c4b5263d151aafd07c", GitTreeState:"clean", BuildDate:"2021-02-18T16:12:00Z", GoVersion:"go1.15.8", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.4", GitCommit:"e87da0bd6e03ec3fea7933c4b5263d151aafd07c", GitTreeState:"clean", BuildDate:"2021-02-18T16:03:00Z", GoVersion:"go1.15.8", Compiler:"gc", Platform:"linux/amd64"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant