Kubernetes Troubleshooting

DescriptionKubernetes - pod creation stuck in ‘pending’ stateVersion:
Symptoms

kubectl get pods

NAME READY STATUS RESTARTS AGE

test-0 0/1 Pending 0 2m17s

Logs to View

Command: kubectl describe pod test-0

Output:

Events:

Type Reason Age From Message

---- ------ ---- ---- -------

Warning FailedScheduling 47m default-scheduler error while running "VolumeBinding" filter plugin for pod "test-0": pod has unbound immediate Persistent

VolumeClaims

Warning FailedScheduling 47m default-scheduler error while running "VolumeBinding" filter plugin for pod "test-0": pod has unbound immediate Persistent

VolumeClaims

Root CauseIncorrect JWT definition.
ResolutionRe-run the install lb-csi with the correct credentials.
DescriptionAdd Storage Profile Workaround for K8s/OpenShift
Notes

When the OpenShift Virtualization operator is installed (kubevirt), another project from CNCF is pulled in called "Containerized Data Importer".

The goal of this project is to create the "connection" between a PVC and a VM and also provide the ability to have ready qcow2 images as PVCs to be used when creating a VM (by default in OCP, you get the latest image of Fedora, CentOS, RHEL 8, 9 and 10).

A storage profile is created per storage class.

Because Lightbits is currently not appearing in containerized-data-importer/pkg/storagecapabilities/storagecapabilities.go at main · kubevirt/containerized-data-importer, the profile is created with an empty spec.

If requesting a PVC (or PVCs) with RWX when creating the VM, the VM creation will fail when trying to create the OS PVC. The VM creation waits a long time for the PVC to map to the worker node.

Workaround

Run "oc edit # oc get storageprofile lb-rf1-rwx-block -o yaml", and change the spec to:

spec: claimPropertySets:

  • accessModes: ReadWriteMany
  • volumeMode: Block

Once you save the edit, you can recreate the VM.

Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard