Difference between revisions of "Configmap as single file"

From UVOO Tech Wiki
Jump to navigation Jump to search
(Created page with "``` apiVersion: v1 kind: ConfigMap metadata: name: nginx-config ... data: nginx.conf: | ...some raw config string... --- apiVersion: apps/v1 kind: Deployment spec...")
 
 
Line 1: Line 1:
 +
#Example of NGINX
 
```
 
```
 
 
apiVersion: v1
 
apiVersion: v1
 
kind: ConfigMap
 
kind: ConfigMap

Latest revision as of 19:01, 15 January 2023

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