<p>I am trying to patch the PV with new volume id,</p>
<pre><code>kubectl patch pv pvname -p '{&quot;spec&quot;:{&quot;awsElasticBlockStore&quot;:{&quot;volumeID&quot;:&quot;aws://eu-central-1c/volumeid&quot;}}}'
</code></pre>
<p>But getting below error:</p>
<blockquote>
<p>The persistentvolume pvname is invalid:  spec.persistentvolumesource: Forbidden: spec.persistentvolumesource is immutable after creation</p>
</blockquote>
<p>how to proceed?</p>

Anjali
<p>Your error message, &quot;spec.persistentvolumesource is immutable after creation&quot;, means you <em>can't</em> change the volume ID attached to a PersistentVolume.  If you're manually creating PVs (normally you wouldn't) you need to create a new one with a different name.</p>
<p>Several other objects in Kubernetes are immutable, with the most notable example being Pods.  You similarly can't change a Pod's image once it's been created, you need to destroy the existing Pod and create a new one.  Normally you work with a higher-level mutable object like a Deployment that knows how to do this on its own.</p>
