<p>I currently have a <em>managed Azure disk</em> created from a Azure disk snapshot of a <em>Kubernetes Persistent Volume</em> that no longer exists.</p>

<p>I would like to know how to reuse the restored disk in a new 'PersistentVolumeClaim', otherwise K8s will request Azure to create a new empty disk.</p>

<p>My current K8s PersistentVolumeClaim config:</p>

<pre><code>kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: jenkins-master-vol-claim
  annotations: 
    volume.beta.kubernetes.io/storage-class: managed-standard
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 10Gi
</code></pre>

CC BY-SA 3.0
2017-11-14T16:25:17.020Z
Wouldn't it be possible to 'restore' this snapshot into the newly created volume handled by k8s ?
Tensibai
CC BY-SA 3.0
2017-11-14T20:09:07.210Z
I've tried that, but it looks like Azure allows us only to use a 'disk snapshot' as a 'parameter' to create the new disk.
Ygor Thomaz
CC BY-SA 3.0
2017-11-14T20:15:28.407Z
In other words, one existing managed disk can't use a snapshot from another disk.
Ygor Thomaz
CC BY-SA 3.0
2017-11-26T20:18:00.443Z
@YgorThomaz Could you post the comments as an answer?
030
CC BY-SA 3.0
2018-02-13T22:47:51.193Z
I have a similar question which I asked here: https://stackoverflow.com/questions/48774021/how-to-configure-a-manually-provisioned-azure-managed-disk-to-use-as-a-kuberntes
anschoewe
CC BY-SA 3.0
2018-02-21T18:42:49.350Z
`I would like to know how to reuse the restored disk in a new 'PersistentVolumeClaim',` Why?
030
<kubernetes><azure>
Kubernetes on Azure, how do I reuse an existing disk in a new PersistentVolume?
Ygor Thomaz
# Kubernetes on Azure, how do I reuse an existing disk in a new PersistentVolume?

(Asked by: username_0 on 2017-11-13)

I currently have a managed Azure disk created from a Azure disk snapshot of a Kubernetes Persistent Volume that no longer exists.
I would like to know how to reuse the restored disk in a new 'PersistentVolumeClaim', otherwise K8s will request Azure to create a new empty disk.
My current K8s PersistentVolumeClaim config:
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: jenkins-master-vol-claim
  annotations: 
    volume.beta.kubernetes.io/storage-class: managed-standard
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 10Gi

**Tags:** kubernetes, azure

> **Comments:**
> **username_1**: Wouldn't it be possible to 'restore' this snapshot into the newly created volume handled by k8s ?  
> **username_0**: I've tried that, but it looks like Azure allows us only to use a 'disk snapshot' as a 'parameter' to create the new disk.  
> **username_0**: In other words, one existing managed disk can't use a snapshot from another disk.  
> **username_2**: @YgorThomaz Could you post the comments as an answer?  
> **username_3**: I have a similar question which I asked here: https://stackoverflow.com/questions/48774021/how-to-configure-a-manually-provisioned-azure-managed-disk-to-use-as-a-kuberntes  
> **username_2**: `I would like to know how to reuse the restored disk in a new 'PersistentVolumeClaim',` Why?  

---

## 0 answers

