Skip to content

Commit 7f46ebc

Browse files
authored
Merge pull request #56655 from lpettyjo/OSDOCS-5223
OSDOCS-5223: vSphere encryption
2 parents f0c77c5 + 3304684 commit 7f46ebc

File tree

3 files changed

+115
-1
lines changed

3 files changed

+115
-1
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * storage/container_storage_interface/persistent-storage-csi-vsphere.adoc
4+
//
5+
6+
:content-type: PROCEDURE
7+
[id="persistent-storage-csi-vsphere-encryption-datastore-url_{context}"]
8+
= Using datastore URL
9+
10+
.Procedure
11+
12+
To encrypt using the datastore URL:
13+
14+
. Find out the name of the default storage policy in your datastore that supports encryption.
15+
+
16+
This is same policy that was used for encrypting your VMs.
17+
18+
. Create a storage class that uses this storage policy:
19+
+
20+
[source, yaml]
21+
----
22+
kind: StorageClass
23+
apiVersion: storage.k8s.io/v1
24+
metadata:
25+
name: encryption
26+
provisioner: csi.vsphere.vmware.com
27+
parameters:
28+
storagePolicyName: <storage-policy-name> <1>
29+
datastoreurl: "ds:///vmfs/volumes/vsan:522e875627d-b090c96b526bb79c/"
30+
----
31+
<1> Name of default storage policy in your datastore that supports encryption
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
// Module included in the following assemblies:
2+
//
3+
// storage/container_storage_interface/persistent-storage-csi-vsphere.adoc
4+
//
5+
6+
:content-type: PROCEDURE
7+
[id="persistent-storage-csi-vsphere-encryption-tag-based_{context}"]
8+
= Using tag-based placement
9+
10+
.Procedure
11+
12+
To encrypt using tag-based placement:
13+
14+
. In vCenter create a category for tagging datastores that will be made available to this storage class. Also, ensure that *StoragePod(Datastore clusters)*, *Datastore*, and *Folder* are selected as Associable Entities for the created category.
15+
16+
. In vCenter, create a tag that uses the category created earlier.
17+
18+
. Assign the previously created tag to each datastore that will be made available to the storage class. Make sure that datastores are shared with hosts participating in the {product-title} cluster.
19+
20+
. In vCenter, from the main menu, click *Policies and Profiles*.
21+
22+
. On the *Policies and Profiles* page, in the navigation pane, click *VM Storage Policies*.
23+
24+
. Click *CREATE*.
25+
26+
. Type a name for the storage policy.
27+
28+
. Select *Enable host based rules* and *Enable tag based placement rules*.
29+
30+
. In the *Next* tab:
31+
32+
.. Select *Encryption* and *Default Encryption Properties*.
33+
34+
.. Select the tag category created earlier, and select tag selected. Verify that the policy is selecting matching datastores.
35+
36+
. Create the storage policy.
37+
38+
. Create a storage class that uses the storage policy:
39+
+
40+
[source, yaml]
41+
----
42+
kind: StorageClass
43+
apiVersion: storage.k8s.io/v1
44+
metadata:
45+
name: csi-encrypted
46+
provisioner: csi.vsphere.vmware.com
47+
reclaimPolicy: Delete
48+
volumeBindingMode: WaitForFirstConsumer
49+
parameters:
50+
storagePolicyName: <storage-policy-name> <1>
51+
----
52+
<1> Name of the storage policy that you created for encryption

storage/container_storage_interface/persistent-storage-csi-vsphere.adoc

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,38 @@ include::modules/persistent-storage-csi-vsphere-install-issues.adoc[leveloffset=
5151
include::modules/persistent-storage-csi-vsphere-top-aware.adoc[leveloffset=+1]
5252
[role="_additional-resources"]
5353
.Additional resources
54-
* https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-vcenter-esxi-management/GUID-16422FF7-235B-4A44-92E2-532F6AED0923.html?hWord=N4IghgNiBcIC5gOYgL5A[VMware vSphere tag documenation]
54+
* https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-vcenter-esxi-management/GUID-16422FF7-235B-4A44-92E2-532F6AED0923.html?hWord=N4IghgNiBcIC5gOYgL5A[VMware vSphere tag documentation]
5555

56+
[id="vsphere-pv-encryption"]
57+
== vSphere persistent disks encryption
58+
59+
You can encrypt virtual machines (VMs) and dynamically provisioned persistent volumes (PVs) on {product-title} running on top of vSphere.
60+
61+
[NOTE]
62+
====
63+
{product-title} does not support RWX-encrypted PVs. You cannot request RWX PVs out of a storage class that uses an encrypted storage policy.
64+
====
65+
66+
You must encrypt VMs before you can encrypt PVs, which you can do during installation or post-installation.
67+
68+
For information about encrypting VMs, see:
69+
70+
* xref:../../installing/installing_vsphere/installing-vsphere.adoc#installation-vsphere-encrypted-vms_installing-vsphere[Requirements for encrypting virtual machines]
71+
72+
* xref:../../installing/installing_vsphere/installing-vsphere.adoc#installation-vsphere-machines_installing-vsphere[During installation: Step 7 of Installing RHCOS and starting the {product-title} bootstrap process]
73+
74+
* xref:../../post_installation_configuration/vsphere-post-installation-encryption.adoc[Post-installation enabling encryption on a vSphere cluster]
75+
76+
After encrypting VMs, you can configure a storage class that supports dynamic encryption volume provisioning using the vSphere Container Storage Interface (CSI) driver. This can be accomplished in one of two ways using:
77+
78+
* xref:../../storage/container_storage_interface/persistent-storage-csi-vsphere.adoc#persistent-storage-csi-vsphere-encryption-datastore-url_persistent-storage-csi-vsphere[Datastore URL]: This approach is not very flexible, and forces you to use a single datastore. It also does not support topology-aware provisioning.
79+
80+
* xref:../../storage/container_storage_interface/persistent-storage-csi-vsphere.adoc#persistent-storage-csi-vsphere-encryption-tag-based_persistent-storage-csi-vsphere[Tag-based placement]: Encrypts the provisioned volumes and uses tag-based placement to target specific datastores.
81+
82+
include::modules/persistent-storage-csi-vsphere-encryption-datastore-url.adoc[leveloffset=+2]
83+
84+
include::modules/persistent-storage-csi-vsphere-encryption-tag-based.adoc[leveloffset=+2]
85+
86+
[id="additional-resources"]
5687
== Additional resources
5788
* xref:../../storage/container_storage_interface/persistent-storage-csi.adoc#persistent-storage-csi[Configuring CSI volumes]

0 commit comments

Comments
 (0)