ahmetb / kubectl-tree

kubectl plugin to browse Kubernetes object hierarchies as a tree 🎄 (star the repo if you are using)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support PV/PVC/StorageClass?

zanhsieh opened this issue · comments

commented

Hi,

Just curious about kubectl-tree support PV/PVC/StorageClass. I upgraded to latest version (0.4.3) but seems no luck.

$ k get pvc
NAME                      STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS   AGE
prometheus-alertmanager   Bound    pvc-f80a052c-5778-46b2-9aef-7932c02e7517   2Gi        RWO            standard       19h
prometheus-server         Bound    pvc-d5bed05a-cc57-4c80-91b1-cba8fcd7e706   8Gi        RWO            standard       19h

$ k get pv
NAME                                       CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS   CLAIM                             STORAGECLASS   REASON   AGE
pvc-d5bed05a-cc57-4c80-91b1-cba8fcd7e706   8Gi        RWO            Delete           Bound    default/prometheus-server         standard                19h
pvc-f80a052c-5778-46b2-9aef-7932c02e7517   2Gi        RWO            Delete           Bound    default/prometheus-alertmanager   standard                19h

$ k tree pvc prometheus-alertmanager
No resources are owned by this object through ownerReferences.

$ k tree --version
kubectl version v0.4.3

$ k version
WARNING: This version information is deprecated and will be replaced with the output from kubectl version --short.  Use --output=yaml|json to get the full version.
Client Version: version.Info{Major:"1", Minor:"25", GitVersion:"v1.25.4", GitCommit:"872a965c6c6526caa949f0c6ac028ef7aff3fb78", GitTreeState:"clean", BuildDate:"2022-11-09T13:28:30Z", GoVersion:"go1.19.3", Compiler:"gc", Platform:"darwin/arm64"}
Kustomize Version: v4.5.7
Server Version: version.Info{Major:"1", Minor:"25", GitVersion:"v1.25.0", GitCommit:"a866cbe2e5bbaa01cfd5e969aa3e033f3282a8a2", GitTreeState:"clean", BuildDate:"2022-09-01T23:34:08Z", GoVersion:"go1.19", Compiler:"gc", Platform:"linux/arm64"}

Do these objects have ownerReferences?

commented

It seems not. Does PVC/PV/Storage Class suppose to set owerReferences? If so, then would it break the meaning of persist?

I am not sure but this tool doesn't have that logic. See lineage plugin, maybe it handles PVs correctly.