V
V
vacoo2019-10-23 01:09:46
Kubernetes
vacoo, 2019-10-23 01:09:46

How to mount directory on local machine to kubernetes pod?

How to mount directory on local machine to kubernetes pod?
To be like in docker-compose.yml. So that I would mount and local files would be visible in the container

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
TheRonCronix, 2019-10-23
@TheRonCronix

In the pod specification, you can specify the volumes that you want to make available to this pod:
https://kubernetes.io/docs/reference/generated/kub...
And then, in the container specification, you already specify where to mount the volume available to the pod: https ://kubernetes.io/docs/reference/generated/kub...
To mount a path on a physical host, you need a volume of type hostPath.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question