website/docs/user-guide/configmap/mount-file-pod.yaml

22 lines
525 B
YAML

apiVersion: v1
kind: Pod
metadata:
name: config-single-file-volume-pod
spec:
containers:
- name: test-container
image: gcr.io/google_containers/busybox
command: [ "/bin/sh", "-c", "cat /etc/special-key" ]
volumeMounts:
- name: config-volume
mountPath: /etc/special-key
subPath: path/to/special-key
volumes:
- name: config-volume
configMap:
name: test-configmap
items:
- key: data-1
path: path/to/special-key
restartPolicy: Never