I have the following yaml:
volumeMounts:
- name: app-secret
mountPath: /app
readOnly: true
volumes:
- name: app-secret
secret:
secretName: app-secret
items:
- key: app-secret.json
path: appsettings.secret.json
I expect the secret is mounted on /app/appsettings.secret.json
but it isn't. I don't know where it is mounted and the container crashes and I don't have a chance to kubectl exec
into the container to inspect where the secret is mounted. My guess is that it wipes out the content of /app
. Any advice and insight is appreciated.
containers[]
section. If not, then describe your pod using$ kubectl describe
cmd. – Botvinnik