Lightbits Kubernetes Configuration

This article discusses how to connect Lightbits to Kubernetes for use with persistent volumes.

Configuring Lightbits with Kubernetes

To configure Lightbits with Kubernetes:

Downloading and Installing Packages

Download the CSI plugin tarball and unpack (Note: Cross-check the latest version with Lightbits Support):

Bash
Copy

Create the Snapshot controller if not already available:

Bash
Copy

Create the CSI plugin with the discovery-client from the extracted yaml file:

Bash
Copy

Check the install:

Bash
Copy

Expect to see that all pods are in a Ready state and there are no errors.

Configuring the Secret And Storage Class

Grab JWT from the Lightbits cluster and export it:

Bash
Copy

Convert the JWT to base 64:

Bash
Copy

Copy the output and add it to the secrets file:

  1. First, open the secrets file in examples/secrets-and-storage-class.yaml.
  2. Next, paste in the JWT on the next line under jwt: |-, ensuring that the JWT is on one line and the pipe dash symbol stays as |-.
  3. Finally, change the management IP addresses in the file.

The file should look like the example below:

Bash
Copy

Create the secrets and first storage class:

Bash
Copy

Check the status:

Bash
Copy

Testing the Configuration

The examples/filesystem-workload.yaml file provided with the supplementary package contains two manifests:

  1. PVC named example-fs-pvc, referencing example-sc StorageClass created above.
  2. POD named example-fs-pod, binding to example-fs-pvc.

Deploying PVC and POD

To deploy the PVC and the POD, run:

Bash
Copy

Verifying Deployment

Using the following command, we will see the PV, PVC resources in Bound status and POD in READY state.

Bash
Copy

If there are any errors, use the command below to view the logs:

Bash
Copy

Verify that the Lightbits volume (PersistentVolume) is mounted to/mnt/test. There should be files in the directory such as an output of the hostname.

Bash
Copy

Deleting PVC and POD

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