Using VMware vSphere volumes for persistent storage

    You are viewing documentation for a release that is no longer supported. The latest supported version of version 3 is [3.11]. For the most recent version 4, see

    OKD supports VMware vSphere’s Virtual Machine Disk (VMDK) volumes. You can provision your OKD cluster with persistent storage using . Some familiarity with Kubernetes and VMware vSphere is assumed.

    The OKD persistent volume (PV) framework allows administrators to provision a cluster with persistent storage and gives users a way to request those resources without having any knowledge of the underlying infrastructure. vSphere VMDK volumes can be .

    PVs are not bound to a single project or namespace; they can be shared across the OKD cluster. PV claims, however, are specific to a project or namespace and can be requested by users.

    Before creating PVs using vSphere, ensure your OKD cluster meets the following requirements:

    • OKD must first be .

    Storage must exist in the underlying infrastructure before it can be mounted as a volume in OKD. After ensuring OKD is configured for vSphere, all that is required for OKD and vSphere is a VM folder path, file system type, and the API.

    You must define your PV in an object definition before creating it in OKD:

    To create persistent volumes:

    1. Save your definition to a file, for example vsphere-pv.yaml, and create the PV:

    Now you can , which can now use your PV.

    Formatting VMware vSphere volumes

    Before OKD mounts the volume and passes it to a container, it checks that the volume contains a file system as specified by the fsType parameter in the PV definition. If the device is not formatted with the file system, all data from the device is erased and the device is automatically formatted with the given file system.