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

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 namespaces.

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

    kubectl 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.