Kubernetes read secret file content incorrectly

1/26/2017

I stored a RSA key as a secret for my pod, which is used as an environment variable, but my pod keep reporting error because format of my RSA key is incorrect.

However; the RSA key work just fine when used locally, so I believe that the RSA key is correct.

How can I set an RSA key as an environment variable on my pod correctly?

-- Bhoomtawath Plinsut
kubernetes

1 Answer

1/26/2017

Look like the issue is \n. Just removing them from my RSA is enough to solve my issue.

-- Bhoomtawath Plinsut
Source: StackOverflow