apiVersion: v1
kind: Pod
metadata:
  name: secret-access
spec:
  containers:
  - name: centos
    image: centos
    command: ["/bin/sh","-c","cat /secret/password-example; done"]
    volumeMounts:
      - name: secret-vol
        mountPath: /secret
        readOnly: true
  volumes:
  -  name: secret-vol
     secret:
       secretName: mypassword
       items:
       - key: mypassword
         path: password-example