Deploying Pre-Provisioned Block PV PVC and POD

Follow these steps to statically create a PVC in a new Kubernetes cluster, using the information from the leftover underlying volume.

If you are reusing a volume from another Kubernetes cluster, delete the PVC and PV objects from the old Kubernetes cluster before creating a PV in the new Kubernetes cluster.

Deploying a Block Workload

This chart will create three resources on the cluster:

  1. PV pointing to the volume on the Lightbits cluster.
  2. PVC that will bind to this PV (match the size and labels).
  3. POD that will consume this PVC and will run a simple workload on that volume.
Bash
Copy

Will output:

Bash
Copy

Creating a PVC that Binds to the New PV

Define the following PVC resource file - pvc.yml:

YAML
Copy

And create this resource:

Bash
Copy

Verifying that the PVC is Bounded to the PV

Verify that 'PV' and 'PVC' are created and in 'Bounded' state, and that 'POD' is in 'Running' state.

Bash
Copy

Deleting Resources

Delete release:

Bash
Copy

Verify that all resources are gone.

Bash
Copy
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard