title: Kubernetes: How to config a group of pods to be deployed on the same node?
body: <p>The use case is like this:</p>
  <p>So we have several pods using the same <code>persistentVolumeClaim</code> with the <code>accessMode</code> set to <code>ReadWriteOnce</code> (because the storage class of the <code>PersistentVolume</code> only support <code>ReadWriteOnce</code>).</p>
  <p>From <a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes/" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/storage/persistent-volumes/</a>,</p>
  <pre><code>ReadWriteOnce -- the volume can be mounted as read-write by a single node
  </code></pre>
  <p>So these pods should be deployed on the same node in order to access the PVC (otherwise they will fail).</p>
  <p>I would like to ask if there are any ways to config the deployment yaml file so that they can be deployed on the same node? or are there any ways to solve this problem?</p>