Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disks in gke not getting deleted after cluster is terminated #198

Open
geekodour opened this issue Jun 4, 2019 · 1 comment · May be fixed by #205
Open

disks in gke not getting deleted after cluster is terminated #198

geekodour opened this issue Jun 4, 2019 · 1 comment · May be fixed by #205

Comments

@geekodour
Copy link
Member

GCP disks that are created after creation of persistentVolume/persistentVolumeClaim resources are not getting deleted automatically even if the persistentVolumeReclaimPolicy is set to Delete.

Have to investigate if deleting the persistentVolumeClaim resource before terminating the cluster will result in automatic deletion of the disk from GCP.

apiVersion: v1
kind: PersistentVolume
metadata:
 annotations:
   kubernetes.io/createdby: gce-pd-dynamic-provisioner
   pv.kubernetes.io/bound-by-controller: "yes"
   pv.kubernetes.io/provisioned-by: kubernetes.io/gce-pd
 creationTimestamp: 2019-06-03T12:52:33Z
 finalizers:
 - kubernetes.io/pv-protection
 labels:
   failure-domain.beta.kubernetes.io/region: us-central1
   failure-domain.beta.kubernetes.io/zone: us-central1-a
 name: pvc-736fc8fb-85fe-11e9-81c0-42010a80005d
 resourceVersion: "3386"
 selfLink: /api/v1/persistentvolumes/pvc-736fc8fb-85fe-11e9-81c0-42010a80005d
 uid: 74a25d4d-85fe-11e9-81c0-42010a80005d
spec:
 accessModes:
 - ReadWriteOnce
 capacity:
   storage: 10Gi
 claimRef:
   apiVersion: v1
   kind: PersistentVolumeClaim
   name: prometeus-meta
   namespace: default
   resourceVersion: "3375"
   uid: 736fc8fb-85fe-11e9-81c0-42010a80005d
 gcePersistentDisk:
   fsType: ext4
   pdName: gke-prombench-701cdc02-pvc-736fc8fb-85fe-11e9-81c0-42010a80005d
 persistentVolumeReclaimPolicy: Delete
 storageClassName: standard
status:
 phase: Bound

[1] https://cloud.google.com/kubernetes-engine/docs/concepts/persistent-volumes

@halradaideh
Copy link

halradaideh commented Dec 22, 2019

+1

i think disks in Compute Engine should mark the status of the PV if bounded or not if it
s related to GKE
plus if the PV is deleted on the GKE, delete the disk too !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants