IBM Cloud Docs
Why does PVC or pod creation fail due to not finding the Kubernetes secret?

Why does PVC or pod creation fail due to not finding the Kubernetes secret?

Virtual Private Cloud Classic infrastructure

This troubleshooting topic applies only to Red Hat OpenShift clusters that run version 3.11.

When you create your PVC or deploy a pod that mounts the PVC, the creation or deployment fails.

Example error message for a PVC creation failure.

can't get credentials: can't get secret tsecret-key: secrets "secret-key" not found

Example error message for a pod creation failure.

persistentvolumeclaim "pvc-3" not found (repeated 3 times)

The Kubernetes secret that you created is not referenced correctly in your deployment yaml or is not set to the ibm/ibmc-s3fs type.

This task requires Writer or Manager IBM Cloud IAM service access role for all projects.

  1. List the secrets in your cluster and review the secret type. The secret must show ibm/ibmc-s3fs as the Type.

    oc get secrets --all-namespaces
    
  2. If your secret does not show ibm/ibmc-s3fs as the Type, re-create your secret.

  3. Check your YAML configuration file for your PVC and pod to verify that you used the correct secret.