<p>For <strong>persistant volume</strong> in <code>kubernetes</code> i can use <code>HostPath</code> .
But my problem is if one of my pods is restarted and created in other node.</p>

<p>How can i handle this?
I am in <strong>baremetal envinroment</strong>.</p>

<p>should i use <strong>NFS</strong>?</p>

yasin lachini
<p>As @P Ekambaram has already commented in the last comment below his answer, you might consider to use <code>nodeSelector</code> within your Pods by specifying the corresponded label to achieve scheduling Pods on specific Nodes, or via more comprehesive method by adapting <code>nodeAffinity</code> which conceptually brings the same approach but with more flexible options: like <code>requiredDuringSchedulingIgnoredDuringExecution</code> and <code>preferredDuringSchedulingIgnoredDuringExecution</code>. You can find out more relative information in the official Kubernetes <a href="https://kubernetes.io/docs/concepts/configuration/assign-pod-node/" rel="nofollow noreferrer">documentation</a>.</p>
