How to set file path in k8s secret that accessible to my maven image

1/19/2022

I have setup java project running in maven:3.6.2-jdk1 image I needed to give access to my secret file via k8s secret so I created secret like this

apiVersion: v1
kind: Secret
...
stringData:
   key: "~/key.json"

However, I found that this path cannot accessible to pod how to set path that can assessable to pod

-- Bawantha
kubernetes

0 Answers