Feature request: PVs and PVCs
zxti opened this issue ยท 2 comments
Thank you for this wonderful tool!
I saw that it lists PVs and PVCs as supported object relationship, but it doesn't seem to make any connection between PVs and PVCs (doesn't seem to follow claimRefs). This would be great to be able to connect PVs with the rest of the graph (including pods, etc.)!
Hi @zxti, glad this tool was useful to you! ๐
We do actually support PV & PVCs, but please do submit a GitHub issue if you think the tool isn't showing the relationships between PV & PVCs properly ๐
Here's an example of using kube-lineage with a PV created by a Prometheus StatefulSet:
$ kubectl lineage PersistentVolume/pvc-e4b8a541-77be-4eb8-86d3-744bac7472d7 -o wide
NAMESPACE NAME READY STATUS AGE RELATIONSHIPS
PersistentVolume/pvc-e4b8a541-77be-4eb8-86d3-744bac7472d7 - 1d []
monitoring-system โโโ PersistentVolumeClaim/prometheus-k8s-db-prometheus-k8s-0 - 1d [PersistentVolumeClaim]
monitoring-system โโโ Pod/prometheus-k8s-0 4/4 Running 1d [PodVolume]
monitoring-system โโโ Service/prometheus-k8s - 1d [Service]
monitoring-system โ โโโ EndpointSlice/prometheus-k8s-sltm9 - 1d [ControllerReference OwnerReference]
monitoring-system โโโ Service/prometheus-k8s-thanos-sidecar - 1d [Service]
monitoring-system โ โโโ EndpointSlice/prometheus-k8s-thanos-sidecar-gjbcm - 1d [ControllerReference OwnerReference]
monitoring-system โโโ Service/prometheus-operated - 1d [Service]
monitoring-system โโโ EndpointSlice/prometheus-operated-2hltw - 1d [ControllerReference OwnerReference]
Here's an example of using kube-lineage with a PVC created by a Prometheus StatefulSet.
$ kubectl lineage PersistentVolumeClaim/prometheus-k8s-db-prometheus-k8s-0 --dependencies -o wide
NAMESPACE NAME READY STATUS AGE RELATIONSHIPS
monitoring-system PersistentVolumeClaim/prometheus-k8s-db-prometheus-k8s-0 - 1d []
โโโ PersistentVolume/pvc-e4b8a541-77be-4eb8-86d3-744bac7472d7 - 1d [PersistentVolumeClaim]
โโโ StorageClass/gp2 - 1d [PersistentVolumeStorageClass]
โโโ VolumeAttachment/csi-XXXXXXXXXXXXXXXXXXXXXXXXXXX True 1d [VolumeAttachmentSourceVolume]
โโโ CSIDriver/ebs.csi.aws.com - 1d [VolumeAttachmentAttacher]
โ โโโ CSINode/ip-X-X-X-X.us-east-1.compute.internal - 1d [CSINodeDriver]
โ โโโ Node/ip-X-X-X-X.us-east-1.compute.internal True KubeletReady 1d [OwnerReference]
โโโ Node/ip-X-X-X-X.us-east-1.compute.internal True KubeletReady 1d [VolumeAttachmentNode]
You're right! I simply hadn't specified -A
to cross namespaces. Amazing, thank you.