This example is an extended version of the transparent encryption middleware showcased in Section 4.2 of the paper Pods-as-Volumes: Effortlessly Integrating Storage Systems and Middleware into Kubernetes, in Seventh International Workshop on Container Technologies and Container Clouds (WoC '21).
-
File
provisioner.yaml
defines thePavProvisioner
. -
File
usage.yaml
shows how to use the provisioner, defining (1) aStorageClass
that references thePavProvisioner
, (2) aSecret
storing the encryption passphrase, (3) a "wrapping"PersistentVolumeClaim
that uses theStorageClass
and adds encryption to an existing "underlying"PersistentVolumeClaim
, and (4) aPod
that mounts the "wrapping"PersistentVolumeClaim
and sleeps forever.
Note that creating the wrapping PersistentVolumeClaim
will cause all data on the underlying PersistentVolumeClaim
to be lost!
The same occurs when deleting the wrapping PersistentVolumeClaim
.