1

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.

octopi
  • 145
  • 3
  • 11
  • 3
    I'm trying to reproduce your environment, do you mind posting the whole yaml and the nginx.conf? this way I can reproduce it better. also read [**how to create a minimal, reproducible example**](http://stackoverflow.com/help/mcve) in order to get a faster and better answer – Will R.O.F. Apr 02 '20 at 14:17

1 Answers1

1

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;'" ]

octopi
  • 145
  • 3
  • 11