Transform SSL .crt to kubernetes inline format

Secrets are stored as base64, see: https://kubernetes.io/docs/concepts/configuration/secret/

Or the example from here: https://kubernetes.io/docs/tasks/tls/managing-tls-in-a-cluster/

cat server.csr | base64 | tr -d '\n'

Simply encode it with Base 64 : cat mycert.crt | base64 -w0


cat mycert.crt|base64 -w0 better

-w, --wrap=COLS wrap encoded lines after COLS character (default 76). Use 0 to disable line wrapping