website/content/id/examples/pods/pod-configmap-volume.yaml

20 lines
488 B
YAML

apiVersion: v1
kind: Pod
metadata:
name: dapi-test-pod
spec:
containers:
- name: test-container
image: k8s.gcr.io/busybox
command: [ "/bin/sh", "-c", "ls /etc/config/" ]
volumeMounts:
- name: config-volume
mountPath: /etc/config
volumes:
- name: config-volume
configMap:
# Berikan nama dari ConfigMap yang berisi berkas-berkas yang ingin kamu
# tambahkan ke kontainer
name: special-config
restartPolicy: Never