I've created a pod that works as Nginx Proxy. It works well with the default configuration but when I add my custom configuration via ConfigMap it crashes. This is the only log I have.
/bin/bash: /etc/nginx/nginx.conf: Read-only file system
My deployment.yaml
volumeMounts:
- name: nginx-config
mountPath: /etc/nginx/nginx.conf
subPath: nginx.conf
readOnly: false
volumes:
- name: nginx-config
configMap:
name: nginx-config
If could help I've found this answer on StackOverflow but I don't understand how to do those passages.
The config is correct. Reading the Nginx Docker documentation I've found that I have to add command: [ "/bin/bash", "-c", "nginx -g 'daemon off;'" ]