Why does PVC or pod creation fail due to not finding the Kubernetes secret?
Virtual Private Cloud Classic infrastructure
PVC or pod creation fails because the Kubernetes secret for IBM Cloud Object Storage is not found or incorrectly referenced.
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 file or is not set to the ibm/ibmc-s3fs type.
Resolving the issue
This task requires the Writer or Manager IBM Cloud IAM service access role for all projects.
-
List the secrets in your cluster and review the secret type. The secret must show
ibm/ibmc-s3fsas the Type.oc get secrets --all-namespaces -
If your secret does not show
ibm/ibmc-s3fsas the Type, re-create your secret. -
Check your YAML configuration file for your PVC and pod to verify that you used the correct secret name.
-
Verify that the secret exists in the same namespace as your PVC or pod.
oc get secret <secret_name> -n <namespace> -
After correcting the secret reference, redeploy your PVC or pod and verify it mounts successfully.
oc get pvc oc get pods