title: How can update existing aws ec2 volume id in persistent volume yaml file
body: <p>I have created the aws ec2 volume using storageclass, persistentvolume, persistentvolumeclaim due to some AZ problem my ec2 instance moved to some
  other AZ. I have created snapshot from the existing volume and created new volume in the instance created AZ.</p>
  <p>The problem I cannot able to update the newly created volume in my persistentvolume yaml</p>
  <blockquote>
  <p>error: persistentvolumes &quot;jenkins-pv&quot; is invalid</p>
  </blockquote>
  <p>How to update existing volume id in the PV yaml?</p>
  <p>Below are my yaml files</p>
  <p>storageclass yaml</p>
  <pre><code>apiVersion: storage.k8s.io/v1
  kind: StorageClass
  metadata:
    name: jenkins-sc
  parameters:
    fsType: ext4
    type: gp2
  provisioner: kubernetes.io/aws-ebs
  reclaimPolicy: Delete
  volumeBindingMode: WaitForFirstConsumer
  </code></pre>
  <p>PersistentVolumeClaim yaml</p>
  <pre><code>apiVersion: v1
  kind: PersistentVolumeClaim
  metadata:
    name: jenkins-pvc
    namespace: dev
    finalizers:
    - kubernetes.io/pvc-protection
  spec:
    accessModes:
      - ReadWriteOnce
    resources:
      requests:
        storage: 8Gi
    storageClassName: jenkins-sc
  </code></pre>
  <p>PersistentVolume yaml</p>
  <pre><code>apiVersion: v1
  kind: PersistentVolume
  metadata:
    annotations:
      kubernetes.io/createdby: aws-ebs-dynamic-provisioner
      pv.kubernetes.io/bound-by-controller: &quot;yes&quot;
      pv.kubernetes.io/provisioned-by: kubernetes.io/aws-ebs
    finalizers:
    - kubernetes.io/pv-protection
    labels:
      failure-domain.beta.kubernetes.io/region: us-east-2
      failure-domain.beta.kubernetes.io/zone: us-east-2b
    name: jenkins-pv
  spec:
    accessModes:
    - ReadWriteOnce
    awsElasticBlockStore:
      fsType: ext4
      volumeID: aws://us-east-2b/vol-0c999673840f0836e
    capacity:
      storage: 8Gi
    claimRef:
      apiVersion: v1
      kind: PersistentVolumeClaim
      name: jenkins-pvc
      namespace: dev
    nodeAffinity:
      required:
        nodeSelectorTerms:
        - matchExpressions:
          - key: failure-domain.beta.kubernetes.io/zone
            operator: In
            values:
            - us-east-2b
          - key: failure-domain.beta.kubernetes.io/region
            operator: In
            values:
            - us-east-2
    persistentVolumeReclaimPolicy: Retain
    storageClassName: jenkins-sc
    volumeMode: Filesystem
  </code></pre>