MountVolume.SetUp failed for volume "key" : references non-existent secret key: key
Quote from moshe on 18/03/2022, 6:37 amProblem
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
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