Skip to content

Instantly share code, notes, and snippets.

@casibbald
Forked from matthewpalmer/pod.yaml
Created April 16, 2019 08:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save casibbald/73ee07f6ee7f94afca04e492fac7ec93 to your computer and use it in GitHub Desktop.
Save casibbald/73ee07f6ee7f94afca04e492fac7ec93 to your computer and use it in GitHub Desktop.
kind: Pod
apiVersion: v1
metadata:
name: pod-using-configmap
spec:
# Add the ConfigMap as a volume to the Pod
volumes:
# `name` here must match the name
# specified in the volume mount
- name: example-configmap-volume
# Populate the volume with config map data
configMap:
# `name` here must match the name
# specified in the ConfigMap's YAML
name: example-configmap
containers:
- name: container-configmap
image: nginx:1.7.9
# Mount the volume that contains the configuration data
# into your container filesystem
volumeMounts:
# `name` here must match the name
# from the volumes section of this pod
- name: example-configmap-volume
mountPath: /etc/config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment