Skip to content

Permission denied to TLS key on K8s #777

@dajester2013

Description

@dajester2013

I am trying to deploy postgres 12.4 to kubernetes. I have set up a certificate using cert-manager.io, and it is being mounted as a volume from a secret.

The first time I tried, initdb complained that the permissions on the key file were too open. So I changed the file mode to 600, then 640 as suggested, but now I get this:

waiting for server to start....2020-10-27 11:37:28.737 GMT [46] FATAL:  could not load private key file "/var/run/secrets/pg/certs/tls.key": Permission denied

These are the resources I'm creating: https://gist.github.com/dajester2013/a4df3195905c416016ee7dc783b1d98f

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionUsability question, not directly related to an error with the image

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions