0

I am running RabbitMQ inside Kubernetes cluster. When I type the following command in order to know where volume has been mounted in my Docker desktop virtual machine

kubectl get pv pvc-7c1bf15b-7f84-406e-a8d9-0c5d7442bd71 -o yaml

I get the following response

apiVersion: v1
kind: PersistentVolume
metadata:
  annotations:
    docker.io/hostpath: /var/lib/k8s-pvs/persistence-rabbitmq-server-0/pvc-7c1bf15b-7f84-406e-a8d9-0c5d7442bd71
    pv.kubernetes.io/provisioned-by: docker.io/hostpath
  creationTimestamp: "2022-06-06T14:55:21Z"
  finalizers:
  - kubernetes.io/pv-protection
  name: pvc-7c1bf15b-7f84-406e-a8d9-0c5d7442bd71
  resourceVersion: "9194"
  uid: bc0229e3-0d94-454c-b4c7-0ac08ce48d7d
spec:
  accessModes:
  - ReadWriteOnce
  capacity:
    storage: 50Mi
  claimRef:
    apiVersion: v1
    kind: PersistentVolumeClaim
    name: persistence-rabbitmq-server-0
    namespace: default
    resourceVersion: "9184"
    uid: 7c1bf15b-7f84-406e-a8d9-0c5d7442bd71
  hostPath:
    path: /var/lib/k8s-pvs/persistence-rabbitmq-server-0/pvc-7c1bf15b-7f84-406e-a8d9-0c5d7442bd71
    type: ""
  persistentVolumeReclaimPolicy: Delete
  storageClassName: hostpath
  volumeMode: Filesystem
status:
  phase: Bound

It seems that inside docker Desktop Virtual machine, volume is being mounted on this path

/var/lib/k8s-pvs/persistence-rabbitmq-server-0/pvc-7c1bf15b-7f84-406e-a8d9-0c5d7442bd71

But when I go inside the docker desktop virtual machine by typing the following command

wsl --distribution docker-desktop

I am unable to see the k8s-pvs folder inside /var/lib path. Can anyone guide me why I am unable to view the k8s-pvs folder in /var/lib inside docker desktop virtual machine.

1 Answer 1

0

The persistent volumes are stored in the docker-desktop-data virtual machine.

On my Windows 11 system the hostPath:

/var/lib/k8s-pvs/data-pg-dev-postgresql-0

Is found in:

\\wsl.localhost\docker-desktop-data\version-pack-data\community\k8s-pvs

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .