I am trying to project a file e.g. /opt/passwd under /opt dir, but 
currently neither secret or configmap appears to support projecting a file 
under already populated dir, I can't access other contents under it. The 
only content I found is /opt/passwd in this case. Below is the example when 
using secret

apiVersion: v1
kind: Pod
metadata:
  name: busybox
spec:
  containers:
  - name: busybox
    image: busybox
    command:
      - sleep
      - "3600"
    volumeMounts:
      - name: passwd
        mountPath: /opt
  volumes:
    - name: passwd
      secret:
        secretName: proj-passwd
        items:
          - key: passwd
            path: passwd

The idea is project it under /etc/passwd but when I use /etc as mountPath 
container won't start due to nothing else being there except "passwd" file.

-- 
You received this message because you are subscribed to the Google Groups 
"Containers at Google" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-containers.
For more options, visit https://groups.google.com/d/optout.

Reply via email to