Configmap as single file
Jump to navigation
Jump to search
Example of NGINX
apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-config
...
data:
nginx.conf: |
...some raw config string...
---
apiVersion: apps/v1
kind: Deployment
spec:
...
template:
...
spec:
containers:
...
volumeMounts:
- name: nginx-config-volume
mountPath: /etc/nginx/nginx.conf
subPath: nginx.conf
volumes:
- name: nginx-config-volume
configMap:
name: nginx-config