Reputation: 121
Ive recently started using openshift 4 and im a bit lost. I have a running pod and I created config map for it but I cant find a way to conect the two. Ive been told to add the config map to the deployment config of the pod in a specific path. I tried editing the pod's yaml file to add the file as a volume but got an error when I tried to save the changes. anyone has an idea how can I add the config map file so I can access it in a specific path in a pod?
Upvotes: 1
Views: 2979
Reputation: 1221
The example of adding configmap as a volume to a pod is explained in official kubernetes documentation
Below is the sample
volumeMounts:
- name: config-volume
mountPath: /etc/config
volumes:
- name: config-volume
configMap:
# Provide the name of the ConfigMap containing the files you want
# to add to the container
name: special-config
Upvotes: 1