read-only error creating Kubernetes ssl secret using nginx ingress

11/27/2018

I've created a secret called 'test' in my cluster containing ssl key and cert references. I'm trying to add this to my nginx ingress controller but am getting a RunContainerError.

When I log the crashed pod I see the following:

starting container process caused "process_linux.go:359: container init caused \"rootfs_linux.go:54: mounting \\"/var/lib/kubelet/pods/cefd1bf7-f23b-11e8-a8dc-f22020d2318c/volumes/kubernetes.io~secret/secret-volume\\" to rootfs \\"/var/lib/docker/overlay2/93038084b5de93315f0eb960c97cf6b57d3188daee5d129da8b766e470508ea9/merged\\" at \\"/var/lib/docker/overlay2/93038084b5de93315f0eb960c97cf6b57d3188daee5d129da8b766e470508ea9/merged/etc/nginx/ssl\\" caused \\"mkdir /var/lib/docker/overlay2/93038084b5de93315f0eb960c97cf6b57d3188daee5d129da8b766e470508ea9/merged/etc/nginx/ssl: read-only file system\\"\""

Inside my ingress controller I have the following:

 volumeMounts:
      - name: secret-volume
        mountPath: /etc/nginx/ssl

and

volumes:
    - name: secret-volume
      secret:
        secretName: test
-- Ben Gannaway
kubernetes
nginx-ingress

0 Answers