Forum archive › Kubernetes & Helm Charts
ArchiveMountVolume.SetUp failed for volume \"key\" : references non-existent secret key: key
Problem
when running
kubectl describe pod <POD NAME>
user gets the following error
MountVolume.SetUp failed for volume "key" : references non-existent secret key: key
Solution
you need to create a secret with a key reference
kubectl create secret generic ssh-key --from-file=key=mysshprivatekeyfile.pem
key will create the secret in the following format
apiVersion: v1
data:
key: LS0tLS1CRUdJTiB........
kind: Secret
We do this for a living.
Kubernetes, DevOps and platform engineering, delivered in days — not another weekend lost to a stack trace.
Start a project →