Forum Navigation
You need to log in to create posts and topics.

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