<p>I'm a beginner in kubernetes, and when I was reading the book, I found that it is not recommended to use hostpath as the volume type for production environment, because it will lead to binding between pod and node, but if you don't use hostpath, then if you use other volume types, when reading and writing files, will it lead to extra network IO, and will this performance suffer? Will this have an additional performance impact?</p>

<p>hostpath is, as the name suggests, reading and writing from a place on the host where the pod is running. If the host goes down, or the pod gets evicted or otherwise removed from the node, that data is (normally) lost. This is why the &quot;binding&quot; is mentioned -- the pod must stay on that same node otherwise it will lose that data.</p>
<p>Using a volume type and having volumes provisioned is better as the disk and the pod can be reattached together on another node and you will not lose the data.</p>
<p>In terms of I/O, there would indeed be a miniscule difference, since you're no longer talking to the node's local disk but a mounted disk.</p>
<p>hostPath volumes are generally used for temporary files or storage that can be lost without impact to the pod, in much the same way you would use <code>/tmp</code> on a desktop machine/</p>
