Reputation: 15
I'm trying to mount my local machine code (windows 10 + Docker Desktop) to a pod (its mountning the folders but without mounting anything inside them) // test-pod.yaml
apiVersion: v1
kind: Pod
metadata:
name: test-pod
spec:
containers:
- name: test-container
image: alpine
command: ["sh", "-c", "while true; do sleep 30; done"]
volumeMounts:
- mountPath: /mnt/c/Users/FPCC/Desktop/web-dev/healthflow/authservice/
name: test-volume
volumes:
- name: test-volume
hostPath:
path: /mnt/c/Users/FPCC/Desktop/web-dev/healthflow/authservice/
type: DirectoryOrCreate
then I try (after applying the pod) to kubectl exec -it test-pod -- sh
and then I try to list what I got so I try ls mnt/c/Users/FPCC/Desktop/web-dev/healthflow/
and it result in listing the folder authservice
if i try to list what inside it, it's empty (non of my host machine code (ts files) was mounted)
I tried to use pvc but the result is the same
Upvotes: 0
Views: 49