Add example mounting ConfigMap as a single file into /etc dir
ref: https://github.com/kubernetes/kubernetes/pull/22575
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
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
|
||||
Reference in New Issue
Block a user