apiVersion: v1
kind: Pod
metadata:
  name: mypod
spec:
  containers:
  - name: mypod
    image: alpine:3.6
    imagePullPolicy: IfNotPresent
    command:
    - sleep
    - 1d
    volumeMounts:
    - name: foo
      mountPath: "/etc/foo"
      readOnly: true
  volumes:
  - name: foo
    secret:
      secretName: my-secret

#[dinesh@master1 ~]$ k exec -it mypod -- ls /etc/foo
#key1  key2
#[dinesh@master1 ~]$ k exec -it mypod -- cat /etc/foo/key1
#supersecret
#[dinesh@master1 ~]$ k exec -it mypod -- cat /etc/foo/key2
#topsecret
#[dinesh@master1 ~]$ 

# Note: docker copy would expose trhe secret values
# [root@worker1 ~]# docker cp 382fc12dd2ad:/etc/foo tmp
# [root@worker1 ~]# ls tmp
# key1  key2
# [root@worker1 ~]# 
#
