I'm trying to create PVC which has the storage class encrypted. These PVCs are created dynamically. As per this link- https://kubernetes.io/docs/concepts/storage/storage-classes/#gce-pd for AWS EBS, there is a parameter 'encrypted' which can be set to true or false to enable the encryption for the disk/volume. Example below for AWS:
kind: StorageClass
apiVersion: storage.k8s.io/v1beta1
metadata:
name: ebs
provisioner: kubernetes.io/aws-ebs
parameters:
zone: "###ZONE###"
encrypted: "true"
However, there is no such parameter for GCE PD in GCP. Is there any way in which I can provide the encryption parameter for the GCE PD so that the resulting disk is encrypted?
Following the Encrypt disks with customer-supplied encryption keys:
Type of issued storage depends on options you will specify:
In case
replication-type
is set toregional-pd
- you will have Regional persistent diskIn case
replication-type
is set tonone
- you will have [https://cloud.google.com/compute/docs/disks/#pdspecs)Storage options will help you ensure the
Zonal standard persistent disks
andRegional persistent disks
have:Follow the Encrypt disks with customer-supplied encryption keys procedure to encrypt new persistent disks with your own key. You cannot encrypt existing persistent disks with your own key.
Please pay attention to restrictions:
Compute Engine does not store encryption keys with instance templates, so you cannot use your own keys to encrypt disks in a managed instance group.
Hope this help you understand this topic